svn path=/trunk/; revision=2578
volatile ULONG OldInt1Handler=0;
volatile ULONG OldInt1Handler=0;
-__asm__("
-NewInt1Handler:
- pushl %eax
- movl %dr6,%eax
- testl $(1<<14),%eax
- jz exceptionnotsinglestep
-
- popl %eax
- pushl $" STR(REASON_SINGLESTEP) "
- jmp NewInt31Handler
-
-exceptionnotsinglestep:
- popl %eax
- pushl $" STR(REASON_HARDWARE_BP) "
- jmp NewInt31Handler
-");
-
BOOLEAN InstallTraceHook(void)
{
ULONG LocalInt1Handler;
BOOLEAN InstallTraceHook(void)
{
ULONG LocalInt1Handler;
+//this asm function must be at least second in the file. otherwise gcc does not
+//generate correct code.
+__asm__("
+NewInt1Handler:
+ pushl %eax
+ movl %dr6,%eax
+ testl $(1<<14),%eax
+ jz exceptionnotsinglestep
+
+ popl %eax
+ pushl $" STR(REASON_SINGLESTEP) "
+ //call _ping1
+ jmp NewInt31Handler
+
+exceptionnotsinglestep:
+ popl %eax
+ pushl $" STR(REASON_HARDWARE_BP) "
+ jmp NewInt31Handler
+");
+
void DeInstallTraceHook(void)
{
DPRINT((0,"DeInstallTraceHook(OldInt1Handler=%0.8x)...\n",OldInt1Handler));
void DeInstallTraceHook(void)
{
DPRINT((0,"DeInstallTraceHook(OldInt1Handler=%0.8x)...\n",OldInt1Handler));
+wchar_t PICE_towlower(wchar_t c)
+{
+ if ( c>=L'A' && c<=L'Z' )
+ return (c - (L'A' - L'a'));
+ return(c);
+}
+
ULONG PICE_wcsicmp(WCHAR* s1, WCHAR* s2)
{
ULONG result=1;
while(IsAddressValid((ULONG)s1) && *s1 && // not end of string
IsAddressValid((ULONG)s2) && *s2 && // not end of string
ULONG PICE_wcsicmp(WCHAR* s1, WCHAR* s2)
{
ULONG result=1;
while(IsAddressValid((ULONG)s1) && *s1 && // not end of string
IsAddressValid((ULONG)s2) && *s2 && // not end of string
- towlower(*s1)==towlower(*s2) ) // char are the same except case
+ PICE_towlower(*s1)==PICE_towlower(*s2) ) // char are the same except case
UCHAR AsciiFromScan(UCHAR s)
{
ULONG i;
UCHAR AsciiFromScan(UCHAR s)
{
ULONG i;
if(!bShift)
{
if(ucKeyboardLayout == GERMANY)
if(!bShift)
{
if(ucKeyboardLayout == GERMANY)