winedbg: Correctly display whether we're in 32 vs 64 bit code.
This commit is contained in:
parent
8734d5b9ac
commit
3833600c79
|
@ -131,7 +131,8 @@ static unsigned dbg_exception_prolog(BOOL is_debug, BOOL first_chance, const EXC
|
|||
switch (addr.Mode)
|
||||
{
|
||||
case AddrModeFlat:
|
||||
dbg_printf(" in 32-bit code (%s)",
|
||||
dbg_printf(" in %d-bit code (%s)",
|
||||
be_cpu->pointer_size * 8,
|
||||
memory_offset_to_string(hexbuf, addr.Offset, 0));
|
||||
break;
|
||||
case AddrModeReal:
|
||||
|
@ -141,7 +142,7 @@ static unsigned dbg_exception_prolog(BOOL is_debug, BOOL first_chance, const EXC
|
|||
dbg_printf(" in 16-bit code (%04x:%04x)", addr.Segment, (unsigned) addr.Offset);
|
||||
break;
|
||||
case AddrMode1632:
|
||||
dbg_printf(" in 32-bit code (%04x:%08lx)", addr.Segment, (unsigned long) addr.Offset);
|
||||
dbg_printf(" in segmented 32-bit code (%04x:%08lx)", addr.Segment, (unsigned long) addr.Offset);
|
||||
break;
|
||||
default: dbg_printf(" bad address");
|
||||
}
|
||||
|
@ -164,15 +165,14 @@ static unsigned dbg_exception_prolog(BOOL is_debug, BOOL first_chance, const EXC
|
|||
if (addr.Mode != dbg_curr_thread->addr_mode)
|
||||
{
|
||||
const char* name = NULL;
|
||||
|
||||
|
||||
switch (addr.Mode)
|
||||
{
|
||||
case AddrMode1616: name = "16 bit"; break;
|
||||
case AddrMode1632: name = "32 bit"; break;
|
||||
case AddrMode1632: name = "segmented 32 bit"; break;
|
||||
case AddrModeReal: name = "vm86"; break;
|
||||
case AddrModeFlat: name = "32 bit"; break;
|
||||
case AddrModeFlat: name = be_cpu->pointer_size == 4 ? "32 bit" : "64 bit"; break;
|
||||
}
|
||||
|
||||
dbg_printf("In %s mode.\n", name);
|
||||
dbg_curr_thread->addr_mode = addr.Mode;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue