Skip to content

Commit

Permalink
Fixed wrong disas flags used in dbg_disas_code_block
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo720 committed Dec 8, 2023
1 parent 0a9ad70 commit 1e99b39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib86cpu/dbg/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<false>(cpu, disas_ctx.virt_pc, cpu->cpu_ctx.regs.eip, &disas_ctx);
if (disas_ctx.exp_data.idx == EXP_PF) {
Expand Down

0 comments on commit 1e99b39

Please sign in to comment.