mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
make syscalldump dump the names of the functions in apfnSimpleCall array.
svn path=/trunk/; revision=32690
This commit is contained in:
parent
58e1c142fe
commit
4f6b034f60
1 changed files with 25 additions and 2 deletions
|
@ -86,7 +86,14 @@ BOOL CALLBACK EnumSymbolsProc(
|
|||
ULONG SymbolSize,
|
||||
PVOID UserContext)
|
||||
{
|
||||
printf("%s@%d ", pSymInfo->Name, (UINT)UserContext);
|
||||
if ((UINT)UserContext == -1)
|
||||
{
|
||||
printf("%s ", pSymInfo->Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s@%d ", pSymInfo->Name, (UINT)UserContext);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -100,6 +107,8 @@ int main(int argc, char* argv[])
|
|||
UINT i;
|
||||
BOOL bX64;
|
||||
DWORD64 dwW32pServiceTable, dwW32pServiceLimit, dwW32pArgumentTable;
|
||||
DWORD64 dwSimpleCall;
|
||||
PVOID *pfnSimpleCall;
|
||||
DWORD dwServiceLimit;
|
||||
BYTE *pdwArgs;
|
||||
|
||||
|
@ -152,7 +161,7 @@ cont:
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
hMap = CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
|
||||
hMap = CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
|
||||
if (!hMap)
|
||||
{
|
||||
printf("CreateFileMapping() failed: %ld\n", GetLastError());
|
||||
|
@ -205,6 +214,20 @@ cont:
|
|||
}
|
||||
}
|
||||
|
||||
/* Dump apfnSimpleCall */
|
||||
printf("\nDumping apfnSimpleCall:\n");
|
||||
dwSimpleCall = GetOffsetFromName(hProcess, &Sym.Symbol, pModule, "apfnSimpleCall", &bX64);
|
||||
pfnSimpleCall = (PVOID*)(pModule + dwSimpleCall);
|
||||
i = 0;
|
||||
while (pfnSimpleCall[i] != NULL)
|
||||
{
|
||||
printf("0x%x:", i);
|
||||
SymEnumSymbolsForAddr(hProcess, (DWORD64)(ULONG_PTR)pfnSimpleCall[i], EnumSymbolsProc, (PVOID)-1);
|
||||
printf("\n");
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
cleanup:
|
||||
if (pModule)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue