| 38 | } |
| 39 | |
| 40 | BOOL 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; |
| 59 | End: |
| 60 | return (bResult); |
| 61 | } |
| 62 | |
| 63 | BOOL WINAPI GetPdbFilePath(TTD::Cursor* cursor, TTD::GuestAddress pModuleBase, char* PdbPath, size_t PdbPathSize) |
| 64 | { |
no test coverage detected