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