See 64-bit disasm

This commit is contained in:
Stanislav Shwartsman 2005-11-21 22:26:58 +00:00
parent 82dcab043f
commit fd5bd2177a

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: dbg_main.cc,v 1.27 2005-11-14 18:31:59 sshwarts Exp $
// $Id: dbg_main.cc,v 1.28 2005-11-21 22:26:58 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -1936,14 +1936,16 @@ void bx_dbg_disassemble_current (int which_cpu, int print_time)
BX_CPU(which_cpu)->mem->dbg_fetch_mem(phy, 16, bx_disasm_ibuf);
if (BX_CPU(which_cpu)->cpu_mode == BX_MODE_IA32_PROTECTED) { // 16bit & 32bit protected mode
unsigned cpu_mode = BX_CPU(which_cpu)->cpu_mode;
if (cpu_mode >= BX_MODE_IA32_PROTECTED) { // 16bit & 32bit protected mode
Base=BX_CPU(which_cpu)->get_segment_base(BX_SEG_REG_CS);
}
else {
Base=BX_CPU(which_cpu)->sregs[BX_SEG_REG_CS].selector.value<<4;
}
ilen = bx_disassemble.disasm(BX_CPU(which_cpu)->guard_found.is_32bit_code, 0 /* is_64 */,
ilen = bx_disassemble.disasm(BX_CPU(which_cpu)->guard_found.is_32bit_code, cpu_mode == BX_MODE_LONG_64 /* is_64 */,
Base, BX_CPU(which_cpu)->guard_found.eip, bx_disasm_ibuf, bx_disasm_tbuf);
// Note: it would be nice to display only the modified registers here, the easy