- always add a data dump for unknown structures - added some bits about POGO and REPRO entries - protected against too small structures
Signed-off-by: Eric Pouech epouech@codeweavers.com
From: Eric Pouech epouech@codeweavers.com
- always add a data dump for unknown structures - added some bits about POGO and REPRO entries - protected against too small structures
Signed-off-by: Eric Pouech epouech@codeweavers.com --- include/wine/mscvpdb.h | 10 +++++++ tools/winedump/pe.c | 63 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 62 insertions(+), 11 deletions(-)
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 29dd83e73b9..3502e0faed0 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -2820,3 +2820,13 @@ typedef struct OMFSourceModule unsigned short cSeg; unsigned int baseSrcFile[1]; } OMFSourceModule; + + +/* undocumented. IMAGE_DEBUG_TYPE_REPRO directory entry */ +typedef struct +{ + unsigned flags; /* only seen 0x20 */ + GUID guid; /* guid used in CODEVIEW debug entry */ + unsigned unk[3]; /* unknown, potentially hash of some internal parts of image */ + unsigned debug_timestamp; /* used in all DEBUG entries as timestamp (including this one) */ +} IMAGE_DEBUG_REPRO; diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index fbcd9f5c6a5..8f7764a08df 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -2170,17 +2170,58 @@ static void dump_dir_debug_dir(const IMAGE_DEBUG_DIRECTORY* idd, int idx) dump_frame_pointer_omission(idd->PointerToRawData, idd->SizeOfData); break; case IMAGE_DEBUG_TYPE_MISC: - { - const IMAGE_DEBUG_MISC* misc = PRD(idd->PointerToRawData, idd->SizeOfData); - if (!misc) {printf("Can't get misc debug information\n"); break;} - printf(" DataType: %u (%s)\n", - (UINT)misc->DataType, (misc->DataType == IMAGE_DEBUG_MISC_EXENAME) ? "Exe name" : "Unknown"); - printf(" Length: %u\n", (UINT)misc->Length); - printf(" Unicode: %s\n", misc->Unicode ? "Yes" : "No"); - printf(" Data: %s\n", misc->Data); - } - break; - default: break; + { + const IMAGE_DEBUG_MISC* misc = PRD(idd->PointerToRawData, idd->SizeOfData); + if (!misc || idd->SizeOfData < sizeof(*misc)) {printf("Can't get MISC debug information\n"); break;} + printf(" DataType: %u (%s)\n", + (UINT)misc->DataType, (misc->DataType == IMAGE_DEBUG_MISC_EXENAME) ? "Exe name" : "Unknown"); + printf(" Length: %u\n", (UINT)misc->Length); + printf(" Unicode: %s\n", misc->Unicode ? "Yes" : "No"); + printf(" Data: %s\n", misc->Data); + } + break; + case IMAGE_DEBUG_TYPE_POGO: + { + const unsigned* data = PRD(idd->PointerToRawData, idd->SizeOfData); + const unsigned* end = (const unsigned*)((const unsigned char*)data + idd->SizeOfData); + unsigned idx = 0; + + if (!data || idd->SizeOfData < sizeof(unsigned)) {printf("Can't get PODO debug information\n"); break;} + printf(" Header: %08x\n", *(const unsigned*)data); + data++; + printf(" Index Name Offset Size\n"); + while (data + 2 < end) + { + const char* ptr; + ptrdiff_t s; + + if (!(ptr = memchr(&data[2], '\0', (const char*)end - (const char*)&data[2]))) break; + printf(" %-5u %-16s %08x %08x\n", idx, (const char*)&data[2], data[0], data[1]); + s = ptr - (const char*)&data[2] + 1; + data += 2 + ((s + sizeof(unsigned) - 1) / sizeof(unsigned)); + idx++; + } + } + break; + case IMAGE_DEBUG_TYPE_REPRO: + { + const IMAGE_DEBUG_REPRO* repro = PRD(idd->PointerToRawData, idd->SizeOfData); + if (!repro || idd->SizeOfData < sizeof(*repro)) {printf("Can't get REPRO debug information\n"); break;} + printf(" Flags: %08X\n", repro->flags); + printf(" Guid: %s\n", get_guid_str(&repro->guid)); + printf(" _unk0: %08X %u\n", repro->unk[0], repro->unk[0]); + printf(" _unk1: %08X %u\n", repro->unk[1], repro->unk[1]); + printf(" _unk2: %08X %u\n", repro->unk[2], repro->unk[2]); + printf(" Timestamp: %08X\n", repro->debug_timestamp); + } + break; + default: + { + const unsigned char* data = PRD(idd->PointerToRawData, idd->SizeOfData); + if (!data) {printf("Can't get debug information for %s\n", str); break;} + dump_data(data, idd->SizeOfData, " "); + } + break; } printf("\n"); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=137822
Your paranoid android.
=== debian11b (64 bit WoW report) ===
msvcr120: msvcr120.c:1596: Test failed: Chore's task collection was not reset after execution