diff --git a/reactos/apps/utils/pice/module/trace.c b/reactos/apps/utils/pice/module/trace.c index 497bc503440..1aaacfde973 100644 --- a/reactos/apps/utils/pice/module/trace.c +++ b/reactos/apps/utils/pice/module/trace.c @@ -39,23 +39,6 @@ void DeInstallTraceHook(void); 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; @@ -75,6 +58,26 @@ BOOLEAN InstallTraceHook(void) return TRUE; } +//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)); diff --git a/reactos/apps/utils/pice/module/utils.c b/reactos/apps/utils/pice/module/utils.c index ab408fbd57a..74d6f7b34ed 100644 --- a/reactos/apps/utils/pice/module/utils.c +++ b/reactos/apps/utils/pice/module/utils.c @@ -396,13 +396,20 @@ ULONG PICE_fnncmp(char* s1,char* s2, ULONG len) return result; } +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 - towlower(*s1)==towlower(*s2) ) // char are the same except case + PICE_towlower(*s1)==PICE_towlower(*s2) ) // char are the same except case { s1++; s2++; @@ -1976,9 +1983,9 @@ int PICE_sprintf(char * buf, const char *fmt, ...) UCHAR AsciiFromScan(UCHAR s) { ULONG i; - + ENTER_FUNC(); - + if(!bShift) { if(ucKeyboardLayout == GERMANY)