From 1e99b397d0c3c2102f327c5be0e0dcb30227303d Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:19:07 +0100 Subject: [PATCH] Fixed wrong disas flags used in dbg_disas_code_block --- lib86cpu/dbg/debugger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib86cpu/dbg/debugger.cpp b/lib86cpu/dbg/debugger.cpp index 1653cb6..6554b35 100644 --- a/lib86cpu/dbg/debugger.cpp +++ b/lib86cpu/dbg/debugger.cpp @@ -349,7 +349,8 @@ dbg_disas_code_block(cpu_t *cpu, addr_t pc, unsigned instr_num) // setup common disas context disas_ctx_t disas_ctx; disas_ctx.flags = ((cpu->cpu_ctx.hflags & HFLG_CS32) >> CS32_SHIFT) | - ((cpu->cpu_ctx.hflags & HFLG_PE_MODE) >> (PE_MODE_SHIFT - 1)); + ((cpu->cpu_ctx.hflags & HFLG_SS32) >> (SS32_SHIFT - 1)) | + (cpu->cpu_ctx.hflags & HFLG_PE_MODE); disas_ctx.virt_pc = pc; disas_ctx.pc = get_code_addr(cpu, disas_ctx.virt_pc, cpu->cpu_ctx.regs.eip, &disas_ctx); if (disas_ctx.exp_data.idx == EXP_PF) {