winedbg: Fix 32bit displacement sign extension.
This commit is contained in:
parent
7f1105e656
commit
4b8b078344
|
@ -1205,6 +1205,7 @@ db_disasm(db_addr_t loc, boolean_t altfmt)
|
||||||
long imm64;
|
long imm64;
|
||||||
int len;
|
int len;
|
||||||
struct i_addr address;
|
struct i_addr address;
|
||||||
|
db_addr_t addr;
|
||||||
|
|
||||||
get_value_inc(inst, loc, 1, FALSE);
|
get_value_inc(inst, loc, 1, FALSE);
|
||||||
short_addr = FALSE;
|
short_addr = FALSE;
|
||||||
|
@ -1528,19 +1529,19 @@ db_disasm(db_addr_t loc, boolean_t altfmt)
|
||||||
|
|
||||||
case Db:
|
case Db:
|
||||||
get_value_inc(displ, loc, 1, TRUE);
|
get_value_inc(displ, loc, 1, TRUE);
|
||||||
displ += loc;
|
addr = loc + (LONG64)displ;
|
||||||
if (size == WORD)
|
if (size == WORD)
|
||||||
displ &= 0xFFFF;
|
addr &= 0xFFFF;
|
||||||
db_printsym((db_addr_t)displ, DB_STGY_XTRN);
|
db_printsym(addr, DB_STGY_XTRN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Dl:
|
case Dl:
|
||||||
len = db_lengths[(size == LONG && (rex & REX_W)) ? QUAD : size];
|
len = db_lengths[(size == LONG && (rex & REX_W)) ? QUAD : size];
|
||||||
get_value_inc(displ, loc, len, FALSE);
|
get_value_inc(displ, loc, len, FALSE);
|
||||||
displ += loc;
|
addr = loc + (LONG64)displ;
|
||||||
if (size == WORD)
|
if (size == WORD)
|
||||||
displ &= 0xFFFF;
|
addr &= 0xFFFF;
|
||||||
db_printsym((db_addr_t)displ, DB_STGY_XTRN);
|
db_printsym(addr, DB_STGY_XTRN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case o1:
|
case o1:
|
||||||
|
|
Loading…
Reference in New Issue