mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-20 12:18:18 +00:00
esil emulation now stops at breakpoints (#10834)
This commit is contained in:
parent
e57fdba049
commit
9a83761c6d
@ -3377,10 +3377,15 @@ repeat:
|
||||
r_core_cmd0 (core, "sr PC");
|
||||
}
|
||||
}
|
||||
|
||||
// check breakpoints
|
||||
ut64 pc = r_reg_getv (core->anal->reg, name);
|
||||
if (r_bp_get_at (core->dbg->bp, pc)) {
|
||||
r_cons_printf ("[ESIL] hit breakpoint at 0x%"PFMT64x "\n", pc);
|
||||
return_tail (0);
|
||||
}
|
||||
// check addr
|
||||
if (until_addr != UT64_MAX) {
|
||||
if (r_reg_getv (core->anal->reg, name) == until_addr) {
|
||||
if (pc == until_addr) {
|
||||
return_tail (0);
|
||||
}
|
||||
goto repeat;
|
||||
|
@ -111,22 +111,22 @@ static int r_debug_bp_hit(RDebug *dbg, RRegItem *pc_ri, ut64 pc, RBreakpointItem
|
||||
dbg->pc_at_bp = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!dbg->pc_at_bp_set) {
|
||||
eprintf ("failed to determine position of pc after breakpoint");
|
||||
}
|
||||
|
||||
|
||||
if (dbg->pc_at_bp) {
|
||||
pc_off = 0;
|
||||
b = r_bp_get_at (dbg->bp, pc);
|
||||
} else {
|
||||
b = r_bp_get_at (dbg->bp, pc - dbg->bpsize);
|
||||
}
|
||||
|
||||
|
||||
if (!b) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
b = r_bp_get_at (dbg->bp, pc - dbg->bpsize);
|
||||
if (!b) { /* we don't. nothing left to do */
|
||||
/* Some targets set pc to breakpoint */
|
||||
|
Loading…
Reference in New Issue
Block a user