Joshua J. Drake 29c2670039 Fix #4560: Handle recoils well with swstep=true
When resuming after (during) recoil from a breakpoint, the swstep
implementation would fail to advance. In short, the debugger would immediately
interrupt again because r_bp_restore was re-setting the original breakpoint
just before continue. The following changes fix this issue:

1. Modify r_bp_get_in to stop including the byte after a breakpoint. This was
causing r_bp_recoil to fail because it thought there was already a breakpoint
on the next instruction.

2. Pass the real breakpoint address (pc - dbg->bpsize) to r_bp_recoil so
that r_bp_get_in can work properly. Stop adding the b->size there to keep it
going too.

3. Add a state flag to core->dbg to track that we are in the midst of a recoil.

4. When continuing from recoil (in r_debug_continue_kill), restore all
breakpoints except the one we just hit (with the new r_bp_restore_except) to
avoid hitting it again. Once we move past this instruction, that breakpoint
will be set again.
2016-05-15 10:19:24 +02:00
..
2016-05-14 10:59:54 +02:00
2016-05-13 21:52:28 +02:00
2015-09-14 02:08:31 +02:00
2016-05-13 09:57:55 +02:00
2016-03-31 13:21:51 +02:00
2016-04-27 01:52:35 +02:00
2016-02-12 11:37:48 -06:00
2014-10-26 02:47:08 +02:00
2016-02-29 00:04:31 +01:00
2016-04-27 01:08:12 +02:00