mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:53:45 +00:00
winedump: Fix dumping of catchblocks for 32-bit modules.
The frame member isn't present on 32-bit.
This commit is contained in:
parent
b89c9c60d5
commit
3f296440f5
|
@ -982,6 +982,14 @@ static void dump_cxx_exception_data( unsigned int rva, unsigned int func_rva )
|
||||||
UINT frame;
|
UINT frame;
|
||||||
} *catchblock;
|
} *catchblock;
|
||||||
|
|
||||||
|
const struct
|
||||||
|
{
|
||||||
|
UINT flags;
|
||||||
|
UINT type_info;
|
||||||
|
int offset;
|
||||||
|
UINT handler;
|
||||||
|
} *catchblock32;
|
||||||
|
|
||||||
const struct
|
const struct
|
||||||
{
|
{
|
||||||
UINT ip;
|
UINT ip;
|
||||||
|
@ -1032,22 +1040,28 @@ static void dump_cxx_exception_data( unsigned int rva, unsigned int func_rva )
|
||||||
for (i = 0; i < func->tryblock_count; i++)
|
for (i = 0; i < func->tryblock_count; i++)
|
||||||
{
|
{
|
||||||
catchblock = RVA( tryblock[i].catchblock, sizeof(*catchblock) );
|
catchblock = RVA( tryblock[i].catchblock, sizeof(*catchblock) );
|
||||||
|
catchblock32 = RVA( tryblock[i].catchblock, sizeof(*catchblock32) );
|
||||||
printf( " %d: start %d end %d catch %d count %u\n", i,
|
printf( " %d: start %d end %d catch %d count %u\n", i,
|
||||||
tryblock[i].start, tryblock[i].end, tryblock[i].catch,
|
tryblock[i].start, tryblock[i].end, tryblock[i].catch,
|
||||||
tryblock[i].catchblock_count );
|
tryblock[i].catchblock_count );
|
||||||
for (j = 0; j < tryblock[i].catchblock_count; j++)
|
for (j = 0; j < tryblock[i].catchblock_count; j++)
|
||||||
{
|
{
|
||||||
const char *type = "<none>";
|
const char *type = "<none>";
|
||||||
if (catchblock[j].type_info)
|
|
||||||
|
if (PE_nt_headers->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
|
||||||
{
|
{
|
||||||
if (PE_nt_headers->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
|
if (catchblock[j].type_info) type = RVA( catchblock[j].type_info + 16, 1 );
|
||||||
type = RVA( catchblock[j].type_info + 16, 1 );
|
printf( " %d: flags %x offset %+d handler %08x frame %x type %s\n", j,
|
||||||
else
|
catchblock[j].flags, catchblock[j].offset,
|
||||||
type = RVA( catchblock[j].type_info + 8, 1 );
|
catchblock[j].handler, catchblock[j].frame, type );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (catchblock32[j].type_info) type = RVA( catchblock32[j].type_info + 8, 1 );
|
||||||
|
printf( " %d: flags %x offset %+d handler %08x type %s\n", j,
|
||||||
|
catchblock32[j].flags, catchblock32[j].offset,
|
||||||
|
catchblock32[j].handler, type );
|
||||||
}
|
}
|
||||||
printf( " %d: flags %x offset %+d handler %08x frame %x type %s\n", j,
|
|
||||||
catchblock[j].flags, catchblock[j].offset,
|
|
||||||
catchblock[j].handler, catchblock[j].frame, type );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue