fixes for debugger and disasm

This commit is contained in:
Stanislav Shwartsman 2017-05-10 18:31:59 +00:00
parent 1ca366609f
commit af76e0c412
2 changed files with 13 additions and 15 deletions

View File

@ -1116,12 +1116,12 @@ void bx_dbg_info_registers_command(int which_regs_mask)
#if BX_SUPPORT_X86_64 == 0
reg = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EAX);
dbg_printf("eax: 0x%08x %d\n", (unsigned) reg, (int) reg);
reg = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EBX);
dbg_printf("ebx: 0x%08x %d\n", (unsigned) reg, (int) reg);
reg = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_ECX);
dbg_printf("ecx: 0x%08x %d\n", (unsigned) reg, (int) reg);
reg = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EDX);
dbg_printf("edx: 0x%08x %d\n", (unsigned) reg, (int) reg);
reg = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EBX);
dbg_printf("ebx: 0x%08x %d\n", (unsigned) reg, (int) reg);
reg = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_ESP);
dbg_printf("esp: 0x%08x %d\n", (unsigned) reg, (int) reg);
reg = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EBP);
@ -1134,35 +1134,35 @@ void bx_dbg_info_registers_command(int which_regs_mask)
dbg_printf("eip: 0x%08x\n", (unsigned) reg);
#else
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RAX);
dbg_printf("rax: %08x_%08x ", GET32H(reg), GET32L(reg));
dbg_printf("rax: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RBX);
dbg_printf("rbx: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RCX);
dbg_printf("rcx: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RDX);
dbg_printf("rdx: %08x_%08x ", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RBX);
dbg_printf("rbx: %08x_%08x\n", GET32H(reg), GET32L(reg));
dbg_printf("rdx: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RSP);
dbg_printf("rsp: %08x_%08x ", GET32H(reg), GET32L(reg));
dbg_printf("rsp: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RBP);
dbg_printf("rbp: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RSI);
dbg_printf("rsi: %08x_%08x ", GET32H(reg), GET32L(reg));
dbg_printf("rsi: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_RDI);
dbg_printf("rdi: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_R8);
dbg_printf("r8 : %08x_%08x ", GET32H(reg), GET32L(reg));
dbg_printf("r8 : %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_R9);
dbg_printf("r9 : %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_R10);
dbg_printf("r10: %08x_%08x ", GET32H(reg), GET32L(reg));
dbg_printf("r10: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_R11);
dbg_printf("r11: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_R12);
dbg_printf("r12: %08x_%08x ", GET32H(reg), GET32L(reg));
dbg_printf("r12: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_R13);
dbg_printf("r13: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_R14);
dbg_printf("r14: %08x_%08x ", GET32H(reg), GET32L(reg));
dbg_printf("r14: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = BX_CPU(dbg_cpu)->get_reg64(BX_64BIT_REG_R15);
dbg_printf("r15: %08x_%08x\n", GET32H(reg), GET32L(reg));
reg = bx_dbg_get_instruction_pointer();

View File

@ -186,9 +186,7 @@ char *resolve_memsize(char *disbufptr, const bxInstruction_c *i, unsigned src_in
disbufptr = dis_sprintf(disbufptr, "dword ptr ");
break;
#if BX_SUPPORT_X86_64
case BX_GPR64:
#endif
case BX_MMX_REG:
#if BX_SUPPORT_EVEX
case BX_KMASK_REG:
@ -209,7 +207,7 @@ char *resolve_memsize(char *disbufptr, const bxInstruction_c *i, unsigned src_in
disbufptr = dis_sprintf(disbufptr, "xmmword ptr ");
break;
default:
default:
break;
}
}