Commit e0518a9d authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

winedump: Add a possibility to dump raw section data.

parent 15427221
......@@ -186,6 +186,7 @@ static void do_rawdebug (void)
static void do_dumpall(void)
{
globals.do_dumpheader = 1;
globals.do_dump_rawdata = 1;
globals.dumpsect = "ALL";
}
......
......@@ -375,7 +375,7 @@ void dump_section(const IMAGE_SECTION_HEADER *sectHead)
printf(" %-8.8s VirtSize: %-8u VirtAddr: %-8u 0x%08x\n",
sectHead->Name, sectHead->Misc.VirtualSize, sectHead->VirtualAddress,
sectHead->VirtualAddress);
printf(" raw data offs: %-8u raw data size: %-8u\n",
printf(" raw data offs: %-8u raw data size: %-8u\n",
sectHead->PointerToRawData, sectHead->SizeOfRawData);
printf(" relocation offs: %-8u relocations: %-8u\n",
sectHead->PointerToRelocations, sectHead->NumberOfRelocations);
......@@ -453,6 +453,12 @@ static void dump_sections(const void *base, const void* addr, unsigned num_sect)
for (i = 0; i < num_sect; i++, sectHead++)
{
dump_section(sectHead);
if (globals.do_dump_rawdata)
{
dump_data((const unsigned char *)base + sectHead->PointerToRawData, sectHead->SizeOfRawData, " " );
printf("\n");
}
}
}
......
......@@ -128,6 +128,7 @@ typedef struct __globals
/* Options: dump mode */
int do_demangle; /* -d */
int do_dumpheader; /* -f */
int do_dump_rawdata; /* -x */
int do_debug; /* -G == 1, -g == 2 */
/* Option arguments: spec mode */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment