Author: tkreuzer
Date: Mon Apr 14 20:03:15 2008
New Revision: 32971
URL:
http://svn.reactos.org/svn/reactos?rev=32971&view=rev
Log:
syscalldump: fix output of apfnSimpleCall array on 64 bit
Modified:
trunk/rosapps/devutils/syscalldump/syscalldump.c
Modified: trunk/rosapps/devutils/syscalldump/syscalldump.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/syscalldump/sysca…
==============================================================================
--- trunk/rosapps/devutils/syscalldump/syscalldump.c [iso-8859-1] (original)
+++ trunk/rosapps/devutils/syscalldump/syscalldump.c [iso-8859-1] Mon Apr 14 20:03:15
2008
@@ -77,7 +77,7 @@
UINT i;
PVOID pW32pServiceTable, pW32pServiceLimit;
PBYTE pW32pArgumentTable;
- PVOID *pfnSimpleCall;
+ PVOID pfnSimpleCall;
DWORD dwServiceLimit;
struct
@@ -187,14 +187,29 @@
printf("\nDumping apfnSimpleCall:\n");
pfnSimpleCall = (PVOID*)ImageSymToVa(hProcess, &Sym.Symbol, pModule,
"apfnSimpleCall");
i = 0;
- while (pfnSimpleCall[i] != NULL)
- {
- printf("0x%x:", i);
- SymEnumSymbolsForAddr(hProcess, (DWORD64)(ULONG_PTR)pfnSimpleCall[i], EnumSymbolsProc,
(PVOID)-1);
- printf("\n");
- i++;
- }
-
+
+ if (bX64)
+ {
+ DWORD64 *pfnSC64 = (DWORD64*)pfnSimpleCall;
+ while (pfnSC64[i] != 0)
+ {
+ printf("0x%x:", i);
+ SymEnumSymbolsForAddr(hProcess, (DWORD64)pfnSC64[i], EnumSymbolsProc, (PVOID)-1);
+ printf("\n");
+ i++;
+ }
+ }
+ else
+ {
+ DWORD *pfnSC32 = (DWORD*)pfnSimpleCall;
+ while (pfnSC32[i] != 0)
+ {
+ printf("0x%x:", i);
+ SymEnumSymbolsForAddr(hProcess, (DWORD64)pfnSC32[i], EnumSymbolsProc, (PVOID)-1);
+ printf("\n");
+ i++;
+ }
+ }
cleanup:
if (pModule)