Author: tkreuzer
Date: Fri Mar 14 22:08:30 2008
New Revision: 32690
URL:
http://svn.reactos.org/svn/reactos?rev=3D32690&view=3Drev
Log:
make syscalldump dump the names of the functions in apfnSimpleCall array.
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/=
syscalldump.c?rev=3D32690&r1=3D32689&r2=3D32690&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/rosapps/devutils/syscalldump/syscalldump.c (original)
+++ trunk/rosapps/devutils/syscalldump/syscalldump.c Fri Mar 14 22:08:30 20=
08
@@ -86,7 +86,14 @@
ULONG SymbolSize,
PVOID UserContext)
{
- printf("%s@%d ", pSymInfo->Name, (UINT)UserContext);
+ if ((UINT)UserContext =3D=3D -1)
+ {
+ printf("%s ", pSymInfo->Name);
+ }
+ else
+ {
+ printf("%s@%d ", pSymInfo->Name, (UINT)UserContext);
+ }
return TRUE;
}
=
@@ -100,6 +107,8 @@
UINT i;
BOOL bX64;
DWORD64 dwW32pServiceTable, dwW32pServiceLimit, dwW32pArgumentTable;
+ DWORD64 dwSimpleCall;
+ PVOID *pfnSimpleCall;
DWORD dwServiceLimit;
BYTE *pdwArgs;
=
@@ -152,7 +161,7 @@
goto cleanup;
}
=
- hMap =3D CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL); =
+ hMap =3D CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
if (!hMap)
{
printf("CreateFileMapping() failed: %ld\n", GetLastError());
@@ -205,6 +214,20 @@
}
}
=
+ /* Dump apfnSimpleCall */
+ printf("\nDumping apfnSimpleCall:\n");
+ dwSimpleCall =3D GetOffsetFromName(hProcess, &Sym.Symbol, pModule, "apfnS=
impleCall", &bX64);
+ pfnSimpleCall =3D (PVOID*)(pModule + dwSimpleCall);
+ i =3D 0;
+ while (pfnSimpleCall[i] !=3D NULL)
+ {
+ printf("0x%x:", i);
+ SymEnumSymbolsForAddr(hProcess, (DWORD64)(ULONG_PTR)pfnSimpleCall[i], En=
umSymbolsProc, (PVOID)-1);
+ printf("\n");
+ i++;
+ }
+
+
cleanup:
if (pModule)
{