Mercurial > repos > blastem
comparison debug.c @ 1424:4f96103b4b47
Fix s(tep) debug command for the case of dbra with an expired counter reg
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 06 Jul 2017 21:51:35 -0700 |
parents | 85a90964b557 |
children | 079e5b9d59ce |
comparison
equal
deleted
inserted
replaced
1423:9a3e003bdcb3 | 1424:4f96103b4b47 |
---|---|
794 } else if(m68k_is_branch(&inst)) { | 794 } else if(m68k_is_branch(&inst)) { |
795 if (inst.op == M68K_BCC && inst.extra.cond != COND_TRUE) { | 795 if (inst.op == M68K_BCC && inst.extra.cond != COND_TRUE) { |
796 branch_f = after; | 796 branch_f = after; |
797 branch_t = m68k_branch_target(&inst, context->dregs, context->aregs) & 0xFFFFFF; | 797 branch_t = m68k_branch_target(&inst, context->dregs, context->aregs) & 0xFFFFFF; |
798 insert_breakpoint(context, branch_t, debugger); | 798 insert_breakpoint(context, branch_t, debugger); |
799 } else if(inst.op == M68K_DBCC && inst.extra.cond != COND_FALSE) { | 799 } else if(inst.op == M68K_DBCC) { |
800 branch_t = after; | 800 if (inst.extra.cond == COND_FALSE) { |
801 branch_f = m68k_branch_target(&inst, context->dregs, context->aregs) & 0xFFFFFF; | 801 if (context->dregs[inst.dst.params.regs.pri] & 0xFFFF) { |
802 insert_breakpoint(context, branch_f, debugger); | 802 after = m68k_branch_target(&inst, context->dregs, context->aregs); |
803 } | |
804 } else { | |
805 branch_t = after; | |
806 branch_f = m68k_branch_target(&inst, context->dregs, context->aregs); | |
807 insert_breakpoint(context, branch_f, debugger); | |
808 } | |
803 } else { | 809 } else { |
804 after = m68k_branch_target(&inst, context->dregs, context->aregs) & 0xFFFFFF; | 810 after = m68k_branch_target(&inst, context->dregs, context->aregs) & 0xFFFFFF; |
805 } | 811 } |
806 } | 812 } |
807 insert_breakpoint(context, after, debugger); | 813 insert_breakpoint(context, after, debugger); |