Commit fdd0ad59 authored by Alexandre Julliard's avatar Alexandre Julliard

winedump: Enable compilation with long types.

parent 88c06077
EXTRADEFS = -DWINE_NO_LONG_TYPES
PROGRAMS = winedump PROGRAMS = winedump
MANPAGES = winedump.man.in MANPAGES = winedump.man.in
SCRIPTS = function_grep.pl SCRIPTS = function_grep.pl
......
...@@ -538,12 +538,12 @@ void dump_coff_symbol_table(const IMAGE_SYMBOL *coff_symbols, unsigned num_sy ...@@ -538,12 +538,12 @@ void dump_coff_symbol_table(const IMAGE_SYMBOL *coff_symbols, unsigned num_sy
case IMAGE_SYM_CLASS_LABEL: case IMAGE_SYM_CLASS_LABEL:
if (coff_sym->SectionNumber > 0) if (coff_sym->SectionNumber > 0)
{ {
DWORD base = sectHead[coff_sym->SectionNumber - 1].VirtualAddress; UINT base = sectHead[coff_sym->SectionNumber - 1].VirtualAddress;
nampnt = get_coff_name( coff_sym, coff_strtab ); nampnt = get_coff_name( coff_sym, coff_strtab );
printf("%05d | %02d:%08x [%08x] | %s | %s\n", printf("%05d | %02d:%08x [%08x] | %s | %s\n",
i, coff_sym->SectionNumber - 1, coff_sym->Value, i, coff_sym->SectionNumber - 1, (UINT)coff_sym->Value,
base + coff_sym->Value, base + (UINT)coff_sym->Value,
storage_class(coff_sym->StorageClass), nampnt); storage_class(coff_sym->StorageClass), nampnt);
} }
break; break;
...@@ -595,8 +595,8 @@ void dump_frame_pointer_omission(unsigned long base, unsigned long len) ...@@ -595,8 +595,8 @@ void dump_frame_pointer_omission(unsigned long base, unsigned long len)
default: x = NULL; break; default: x = NULL; break;
} }
printf("%08x-%08x %4u %4u %4u %4u %s%s%s\n", printf("%08x-%08x %4u %4u %4u %4u %s%s%s\n",
fpo->ulOffStart, fpo->ulOffStart + fpo->cbProcSize, (UINT)fpo->ulOffStart, (UINT)(fpo->ulOffStart + fpo->cbProcSize),
fpo->cdwLocals, fpo->cdwParams, fpo->cbProlog, fpo->cbRegs, (UINT)fpo->cdwLocals, fpo->cdwParams, fpo->cbProlog, fpo->cbRegs,
x, fpo->fHasSEH ? " SEH" : "", fpo->fUseBP ? " UseBP" : ""); x, fpo->fHasSEH ? " SEH" : "", fpo->fUseBP ? " UseBP" : "");
fpo++; fpo++;
} }
......
...@@ -50,6 +50,6 @@ void dos_dump(void) ...@@ -50,6 +50,6 @@ void dos_dump(void)
printf(" Relocation (file): %u\n", dh->e_lfarlc); printf(" Relocation (file): %u\n", dh->e_lfarlc);
printf(" Overlay number: %u\n", dh->e_ovno); printf(" Overlay number: %u\n", dh->e_ovno);
printf(" OEM id(info): %x(%x)\n", dh->e_oemid, dh->e_oeminfo); printf(" OEM id(info): %x(%x)\n", dh->e_oemid, dh->e_oeminfo);
printf(" Offset to ext header: %x\n", dh->e_lfanew); printf(" Offset to ext header: %x\n", (UINT)dh->e_lfanew);
} }
} }
...@@ -91,8 +91,7 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le ) ...@@ -91,8 +91,7 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
le->e32_border == 0 ? "little-indian" : "big-endian"); le->e32_border == 0 ? "little-indian" : "big-endian");
printf( " Word order: %s\n", printf( " Word order: %s\n",
le->e32_worder == 0 ? "little-indian" : "big-endian"); le->e32_worder == 0 ? "little-indian" : "big-endian");
printf( " Executable format level: %d\n", printf( " Executable format level: %d\n", (UINT)le->e32_level);
le->e32_level);
printf( " CPU type: %s\n", printf( " CPU type: %s\n",
le->e32_cpu == 0x01 ? "Intel 80286" : le->e32_cpu == 0x01 ? "Intel 80286" :
le->e32_cpu == 0x02 ? "Intel 80386" : le->e32_cpu == 0x02 ? "Intel 80386" :
...@@ -110,10 +109,8 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le ) ...@@ -110,10 +109,8 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
le->e32_os == 0x03 ? "DOS 4.x" : le->e32_os == 0x03 ? "DOS 4.x" :
le->e32_os == 0x04 ? "Windows 386" : le->e32_os == 0x04 ? "Windows 386" :
"Unknown"); "Unknown");
printf( " Module version: %d\n", printf( " Module version: %d\n", (UINT)le->e32_ver);
le->e32_ver); printf( " Module type flags: %08x\n", (UINT)le->e32_mflags);
printf( " Module type flags: %08x\n",
le->e32_mflags);
if (le->e32_mflags & 0x8000) if (le->e32_mflags & 0x8000)
{ {
if (le->e32_mflags & 0x0004) if (le->e32_mflags & 0x0004)
...@@ -135,90 +132,48 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le ) ...@@ -135,90 +132,48 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
if (le->e32_mflags & 0x8000) if (le->e32_mflags & 0x8000)
printf( " Module is DLL\n"); printf( " Module is DLL\n");
} }
printf( " Number of memory pages: %d\n", printf( " Number of memory pages: %d\n", (UINT)le->e32_mpages);
le->e32_mpages); printf( " Initial object CS number: %08x\n", (UINT)le->e32_startobj);
printf( " Initial object CS number: %08x\n", printf( " Initial EIP: %08x\n", (UINT)le->e32_eip);
le->e32_startobj); printf( " Initial object SS number: %08x\n", (UINT)le->e32_stackobj);
printf( " Initial EIP: %08x\n", printf( " Initial ESP: %08x\n", (UINT)le->e32_esp);
le->e32_eip); printf( " Memory page size: %d\n", (UINT)le->e32_pagesize);
printf( " Initial object SS number: %08x\n", printf( " Bytes on last page: %d\n", (UINT)le->e32_lastpagesize);
le->e32_stackobj); printf( " Fix-up section size: %d\n", (UINT)le->e32_fixupsize);
printf( " Initial ESP: %08x\n", printf( " Fix-up section checksum: %08x\n", (UINT)le->e32_fixupsum);
le->e32_esp); printf( " Loader section size: %d\n", (UINT)le->e32_ldrsize);
printf( " Memory page size: %d\n", printf( " Loader section checksum: %08x\n", (UINT)le->e32_ldrsum);
le->e32_pagesize); printf( " Offset of object table: %08x\n", (UINT)le->e32_objtab);
printf( " Bytes on last page: %d\n", printf( " Object table entries: %d\n", (UINT)le->e32_objcnt);
le->e32_lastpagesize); printf( " Object page map offset: %08x\n", (UINT)le->e32_objmap);
printf( " Fix-up section size: %d\n", printf( " Object iterate data map offset: %08x\n", (UINT)le->e32_itermap);
le->e32_fixupsize); printf( " Resource table offset: %08x\n", (UINT)le->e32_rsrctab);
printf( " Fix-up section checksum: %08x\n", printf( " Resource table entries: %d\n", (UINT)le->e32_rsrccnt);
le->e32_fixupsum); printf( " Resident names table offset: %08x\n", (UINT)le->e32_restab);
printf( " Loader section size: %d\n", printf( " Entry table offset: %08x\n", (UINT)le->e32_enttab);
le->e32_ldrsize); printf( " Module directives table offset: %08x\n", (UINT)le->e32_dirtab);
printf( " Loader section checksum: %08x\n", printf( " Module directives entries: %d\n", (UINT)le->e32_dircnt);
le->e32_ldrsum); printf( " Fix-up page table offset: %08x\n", (UINT)le->e32_fpagetab);
printf( " Offset of object table: %08x\n", printf( " Fix-up record table offset: %08x\n", (UINT)le->e32_frectab);
le->e32_objtab); printf( " Imported modules name table offset: %08x\n", (UINT)le->e32_impmod);
printf( " Object table entries: %d\n", printf( " Imported modules count: %d\n", (UINT)le->e32_impmodcnt);
le->e32_objcnt); printf( " Imported procedure name table offset: %08x\n", (UINT)le->e32_impproc);
printf( " Object page map offset: %08x\n", printf( " Per-page checksum table offset: %08x\n", (UINT)le->e32_pagesum);
le->e32_objmap); printf( " Data pages offset from top of table: %08x\n", (UINT)le->e32_datapage);
printf( " Object iterate data map offset: %08x\n", printf( " Preload page count: %08x\n", (UINT)le->e32_preload);
le->e32_itermap); printf( " Non-resident names table offset: %08x\n", (UINT)le->e32_nrestab);
printf( " Resource table offset: %08x\n", printf( " Non-resident names table length: %d\n", (UINT)le->e32_cbnrestab);
le->e32_rsrctab); printf( " Non-resident names table checksum: %08x\n", (UINT)le->e32_nressum);
printf( " Resource table entries: %d\n", printf( " Automatic data object: %08x\n", (UINT)le->e32_autodata);
le->e32_rsrccnt); printf( " Debug information offset: %08x\n", (UINT)le->e32_debuginfo);
printf( " Resident names table offset: %08x\n", printf( " Debug information length: %d\n", (UINT)le->e32_debuglen);
le->e32_restab); printf( " Preload instance pages number: %d\n", (UINT)le->e32_instpreload);
printf( " Entry table offset: %08x\n", printf( " Demand instance pages number: %d\n", (UINT)le->e32_instdemand);
le->e32_enttab); printf( " Extra heap allocation: %d\n", (UINT)le->e32_heapsize);
printf( " Module directives table offset: %08x\n", printf( " VxD resource table offset: %08x\n", (UINT)le->e32_winresoff);
le->e32_dirtab); printf( " Size of VxD resource table: %d\n", (UINT)le->e32_winreslen);
printf( " Module directives entries: %d\n", printf( " VxD identifier: %x\n", (UINT)le->e32_devid);
le->e32_dircnt); printf( " VxD DDK version: %x\n", (UINT)le->e32_ddkver);
printf( " Fix-up page table offset: %08x\n",
le->e32_fpagetab);
printf( " Fix-up record table offset: %08x\n",
le->e32_frectab);
printf( " Imported modules name table offset: %08x\n",
le->e32_impmod);
printf( " Imported modules count: %d\n",
le->e32_impmodcnt);
printf( " Imported procedure name table offset: %08x\n",
le->e32_impproc);
printf( " Per-page checksum table offset: %08x\n",
le->e32_pagesum);
printf( " Data pages offset from top of table: %08x\n",
le->e32_datapage);
printf( " Preload page count: %08x\n",
le->e32_preload);
printf( " Non-resident names table offset: %08x\n",
le->e32_nrestab);
printf( " Non-resident names table length: %d\n",
le->e32_cbnrestab);
printf( " Non-resident names table checksum: %08x\n",
le->e32_nressum);
printf( " Automatic data object: %08x\n",
le->e32_autodata);
printf( " Debug information offset: %08x\n",
le->e32_debuginfo);
printf( " Debug information length: %d\n",
le->e32_debuglen);
printf( " Preload instance pages number: %d\n",
le->e32_instpreload);
printf( " Demand instance pages number: %d\n",
le->e32_instdemand);
printf( " Extra heap allocation: %d\n",
le->e32_heapsize);
printf( " VxD resource table offset: %08x\n",
le->e32_winresoff);
printf( " Size of VxD resource table: %d\n",
le->e32_winreslen);
printf( " VxD identifier: %x\n",
le->e32_devid);
printf( " VxD DDK version: %x\n",
le->e32_ddkver);
} }
static void dump_le_objects( const IMAGE_VXD_HEADER *le ) static void dump_le_objects( const IMAGE_VXD_HEADER *le )
......
...@@ -53,8 +53,8 @@ static void dump_import_object(const IMPORT_OBJECT_HEADER *ioh) ...@@ -53,8 +53,8 @@ static void dump_import_object(const IMPORT_OBJECT_HEADER *ioh)
printf(" Version : %X\n", ioh->Version); printf(" Version : %X\n", ioh->Version);
printf(" Machine : %X (%s)\n", ioh->Machine, get_machine_str(ioh->Machine)); printf(" Machine : %X (%s)\n", ioh->Machine, get_machine_str(ioh->Machine));
printf(" TimeDateStamp: %08X %s\n", ioh->TimeDateStamp, get_time_str(ioh->TimeDateStamp)); printf(" TimeDateStamp: %08X %s\n", (UINT)ioh->TimeDateStamp, get_time_str(ioh->TimeDateStamp));
printf(" SizeOfData : %08X\n", ioh->SizeOfData); printf(" SizeOfData : %08X\n", (UINT)ioh->SizeOfData);
name = (const char *)ioh + sizeof(*ioh); name = (const char *)ioh + sizeof(*ioh);
printf(" DLL name : %s\n", name + strlen(name) + 1); printf(" DLL name : %s\n", name + strlen(name) + 1);
printf(" Symbol name : %s\n", name); printf(" Symbol name : %s\n", name);
......
...@@ -80,8 +80,8 @@ static int dump_mfrecord(void) ...@@ -80,8 +80,8 @@ static int dump_mfrecord(void)
printf("%-20s %08x\n", "METAHEADER", size); printf("%-20s %08x\n", "METAHEADER", size);
printf("type %d header_size %#x version %#x size %#x object_count %d max_record_size %#x " printf("type %d header_size %#x version %#x size %#x object_count %d max_record_size %#x "
"parameter_count %d\n", "parameter_count %d\n",
header->mtType, header->mtHeaderSize * 2, header->mtVersion, header->mtSize * 2, header->mtType, header->mtHeaderSize * 2, header->mtVersion, (UINT)header->mtSize * 2,
header->mtNoObjects, header->mtMaxRecord * 2, header->mtNoParameters); header->mtNoObjects, (UINT)header->mtMaxRecord * 2, header->mtNoParameters);
break; break;
} }
MRCASE(META_SETBKCOLOR); MRCASE(META_SETBKCOLOR);
......
...@@ -113,7 +113,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne ) ...@@ -113,7 +113,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
printf( "File header:\n" ); printf( "File header:\n" );
printf( "Linker version: %d.%d\n", ne->ne_ver, ne->ne_rev ); printf( "Linker version: %d.%d\n", ne->ne_ver, ne->ne_rev );
printf( "Entry table: %x len %d\n", ne->ne_enttab, ne->ne_cbenttab ); printf( "Entry table: %x len %d\n", ne->ne_enttab, ne->ne_cbenttab );
printf( "Checksum: %08x\n", ne->ne_crc ); printf( "Checksum: %08x\n", (UINT)ne->ne_crc );
printf( "Flags: %04x\n", ne->ne_flags ); printf( "Flags: %04x\n", ne->ne_flags );
printf( "Auto data segment: %x\n", ne->ne_autodata ); printf( "Auto data segment: %x\n", ne->ne_autodata );
printf( "Heap size: %d bytes\n", ne->ne_heap ); printf( "Heap size: %d bytes\n", ne->ne_heap );
...@@ -127,7 +127,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne ) ...@@ -127,7 +127,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
printf( "Resident name table: %x\n", ne->ne_restab ); printf( "Resident name table: %x\n", ne->ne_restab );
printf( "Module table: %x\n", ne->ne_modtab ); printf( "Module table: %x\n", ne->ne_modtab );
printf( "Import table: %x\n", ne->ne_imptab ); printf( "Import table: %x\n", ne->ne_imptab );
printf( "Non-resident table: %x\n", ne->ne_nrestab ); printf( "Non-resident table: %x\n", (UINT)ne->ne_nrestab );
printf( "Exe type: %x\n", ne->ne_exetyp ); printf( "Exe type: %x\n", ne->ne_exetyp );
printf( "Other flags: %x\n", ne->ne_flagsothers ); printf( "Other flags: %x\n", ne->ne_flagsothers );
printf( "Fast load area: %x-%x\n", ne->ne_pretthunks << ne->ne_align, printf( "Fast load area: %x-%x\n", ne->ne_pretthunks << ne->ne_align,
......
...@@ -711,7 +711,7 @@ static void pdb_dump_fpo(struct pdb_reader* reader, unsigned stream_idx) ...@@ -711,7 +711,7 @@ static void pdb_dump_fpo(struct pdb_reader* reader, unsigned stream_idx)
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
{ {
printf("\t%08x %08x %4d %4d %7d %4d %6s %c %c\n", printf("\t%08x %08x %4d %4d %7d %4d %6s %c %c\n",
fpo[i].ulOffStart, fpo[i].cbProcSize, fpo[i].cdwLocals, fpo[i].cdwParams, (UINT)fpo[i].ulOffStart, (UINT)fpo[i].cbProcSize, (UINT)fpo[i].cdwLocals, fpo[i].cdwParams,
fpo[i].cbProlog, fpo[i].cbRegs, frame_type[fpo[i].cbFrame], fpo[i].cbProlog, fpo[i].cbRegs, frame_type[fpo[i].cbFrame],
fpo[i].fHasSEH ? 'Y' : 'N', fpo[i].fUseBP ? 'Y' : 'N'); fpo[i].fHasSEH ? 'Y' : 'N', fpo[i].fUseBP ? 'Y' : 'N');
} }
......
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