mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +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
1 changed files with 22 additions and 8 deletions
|
@ -982,6 +982,14 @@ static void dump_cxx_exception_data( unsigned int rva, unsigned int func_rva )
|
|||
UINT frame;
|
||||
} *catchblock;
|
||||
|
||||
const struct
|
||||
{
|
||||
UINT flags;
|
||||
UINT type_info;
|
||||
int offset;
|
||||
UINT handler;
|
||||
} *catchblock32;
|
||||
|
||||
const struct
|
||||
{
|
||||
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++)
|
||||
{
|
||||
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,
|
||||
tryblock[i].start, tryblock[i].end, tryblock[i].catch,
|
||||
tryblock[i].catchblock_count );
|
||||
for (j = 0; j < tryblock[i].catchblock_count; j++)
|
||||
{
|
||||
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)
|
||||
type = RVA( catchblock[j].type_info + 16, 1 );
|
||||
else
|
||||
type = RVA( catchblock[j].type_info + 8, 1 );
|
||||
if (catchblock[j].type_info) type = RVA( catchblock[j].type_info + 16, 1 );
|
||||
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 );
|
||||
}
|
||||
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