1
0
Fork 0

DBG: correct PDB signature format

This commit is contained in:
Duncan Ogilvie 2018-01-06 18:35:46 +01:00
parent 2ce2470ea1
commit 550a1ff45a
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 2 additions and 4 deletions

View File

@ -225,15 +225,13 @@ void ReadDebugDirectory(MODINFO & Info, ULONG_PTR FileMapVA)
if(signature == '01BN') if(signature == '01BN')
{ {
auto cv = (CV_INFO_PDB20*)(FileMapVA + codeViewOffset); auto cv = (CV_INFO_PDB20*)(FileMapVA + codeViewOffset);
//TODO: check how this is actually printed Info.pdbSignature = StringUtils::sprintf("%X%X", cv->Signature, cv->Age);
Info.pdbSignature = StringUtils::sprintf("%x%x", cv->Signature, cv->Age);
Info.pdbFile = String((const char*)cv->PdbFileName); Info.pdbFile = String((const char*)cv->PdbFileName);
} }
else if(signature == 'SDSR') else if(signature == 'SDSR')
{ {
auto cv = (CV_INFO_PDB70*)(FileMapVA + codeViewOffset); auto cv = (CV_INFO_PDB70*)(FileMapVA + codeViewOffset);
//TODO: verify how to actually print 'Age' (symsrv.dll) Info.pdbSignature = StringUtils::sprintf("%08X%04X%04X%s%X",
Info.pdbSignature = StringUtils::sprintf("%08X%04X%04X%s%x",
cv->Signature.Data1, cv->Signature.Data2, cv->Signature.Data3, cv->Signature.Data1, cv->Signature.Data2, cv->Signature.Data3,
StringUtils::ToHex(cv->Signature.Data4, 8).c_str(), StringUtils::ToHex(cv->Signature.Data4, 8).c_str(),
cv->Age); cv->Age);