Fixed disassembling functions to handle 16-bit code segments properly.
This commit is contained in:
parent
80e023bdea
commit
3f611ee0c9
|
@ -151,7 +151,11 @@ void memory_examine(const struct dbg_lvalue *lvalue, int count, char format)
|
||||||
ADDRESS addr;
|
ADDRESS addr;
|
||||||
void *linear;
|
void *linear;
|
||||||
|
|
||||||
if (lvalue->type.id == dbg_itype_none) addr = lvalue->addr;
|
if (lvalue->type.id == dbg_itype_none)
|
||||||
|
{
|
||||||
|
be_cpu->build_addr(dbg_curr_thread->handle, &dbg_context,
|
||||||
|
&addr, lvalue->addr.Segment, lvalue->addr.Offset);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
addr.Mode = AddrModeFlat;
|
addr.Mode = AddrModeFlat;
|
||||||
|
@ -637,10 +641,18 @@ void memory_disassemble(const struct dbg_lvalue* xstart,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (xstart)
|
if (xstart)
|
||||||
|
{
|
||||||
|
if (xstart->type.id == dbg_itype_none)
|
||||||
|
{
|
||||||
|
be_cpu->build_addr(dbg_curr_thread->handle, &dbg_context,
|
||||||
|
&last, xstart->addr.Segment, xstart->addr.Offset);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
last.Mode = AddrModeFlat;
|
last.Mode = AddrModeFlat;
|
||||||
last.Offset = types_extract_as_integer( xstart );
|
last.Offset = types_extract_as_integer( xstart );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (xend)
|
if (xend)
|
||||||
stop = types_extract_as_integer(xend);
|
stop = types_extract_as_integer(xend);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue