2 * Helper functions for ntdll
8 #include "debugtools.h"
9 #include "ntdll_misc.h"
11 DEFAULT_DEBUG_CHANNEL(ntdll
);
13 #if defined(__GNUC__) && defined(__i386__)
14 #define USING_REAL_FPU
15 #define DO_FPU(x,y) __asm__ __volatile__( x " %0;fwait" : "=m" (y) : )
16 #define POP_FPU(x) DO_FPU("fstpl",x)
19 void dump_ObjectAttributes (POBJECT_ATTRIBUTES oa
)
22 TRACE("%p:(name=%s, attr=0x%08lx, hRoot=0x%08x, sd=%p) \n",
23 oa
, debugstr_us(oa
->ObjectName
),
24 oa
->Attributes
, oa
->RootDirectory
, oa
->SecurityDescriptor
);
27 void dump_AnsiString(PANSI_STRING as
, BOOLEAN showstring
)
32 TRACE("%p %p(%s) (%u %u)\n", as
, as
->Buffer
, debugstr_as(as
), as
->Length
, as
->MaximumLength
);
34 TRACE("%p %p(<OUT>) (%u %u)\n", as
, as
->Buffer
, as
->Length
, as
->MaximumLength
);
38 void dump_UnicodeString(PUNICODE_STRING us
, BOOLEAN showstring
)
43 TRACE("%p %p(%s) (%u %u)\n", us
, us
->Buffer
, debugstr_us(us
), us
->Length
, us
->MaximumLength
);
45 TRACE("%p %p(<OUT>) (%u %u)\n", us
, us
->Buffer
, us
->Length
, us
->MaximumLength
);
49 LPCSTR
debugstr_as (PANSI_STRING us
)
52 return debugstr_an(us
->Buffer
, us
->Length
);
55 LPCSTR
debugstr_us (PUNICODE_STRING us
)
58 return debugstr_wn(us
->Buffer
, us
->Length
);
61 /*********************************************************************
65 LONG __cdecl
NTDLL__ftol(void)
67 /* don't just do DO_FPU("fistp",retval), because the rounding
68 * mode must also be set to "round towards zero"... */
74 LONG __cdecl
NTDLL__ftol(double fl
)
76 FIXME("should be register function\n");
81 /*********************************************************************
85 LONG __cdecl
NTDLL__CIpow(void)
93 LONG __cdecl
NTDLL__CIpow(double x
,double y
)
95 FIXME("should be register function\n");