MCPcopy Create free account
hub / github.com/commial/ttd-bindings / GetModulePdbInfo

Function GetModulePdbInfo

example_calltree/main.cpp:40–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40BOOL WINAPI GetModulePdbInfo(TTD::Cursor *cursor, TTD::GuestAddress pModuleBase, CV_INFO_PDB70* pPdb70Info)
41{
42 IMAGE_DOS_HEADER ImageDosHeader;
43 IMAGE_NT_HEADERS ImageNtHeaders;
44 IMAGE_DEBUG_DIRECTORY ImageDebugDirectory;
45 BOOL bResult = FALSE;
46
47 // Assume 64 bits
48
49 if (!readMemory(&ImageDosHeader, pModuleBase, sizeof(ImageDosHeader), cursor)) goto End;
50 if (!readMemory(&ImageNtHeaders, pModuleBase + ImageDosHeader.e_lfanew, sizeof(ImageNtHeaders), cursor)) goto End;
51 if (!readMemory(&ImageDebugDirectory, pModuleBase + ImageNtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress, sizeof(ImageDebugDirectory), cursor)) goto End;
52 if (!readMemory(pPdb70Info, pModuleBase + ImageDebugDirectory.AddressOfRawData, sizeof(*pPdb70Info), cursor)) goto End;
53 if (pPdb70Info->CvSignature != RSDS_SIGNATURE)
54 {
55 printf("Invalid CvSignature");
56 goto End;
57 }
58 bResult = TRUE;
59End:
60 return (bResult);
61}
62
63BOOL WINAPI GetPdbFilePath(TTD::Cursor* cursor, TTD::GuestAddress pModuleBase, char* PdbPath, size_t PdbPathSize)
64{

Callers 1

GetPdbFilePathFunction · 0.85

Calls 1

readMemoryFunction · 0.85

Tested by

no test coverage detected