Re: single-step breakpoints

Daniel Jacobowitz
2006-04-25T21:02:06Z

On Tue, Apr 25, 2006 at 10:39:36PM +0200, Mark Kettenis wrote:
> Hi Daniel,
>
> There a slight problem with insert_single_step_breakpoint() and
> remove_single_step_breakpoints(). On OpenBSD, inserting a breakpoint
> into the kernel-provided signal trampoline, may fail. Unfortunately,
> the caller of insert_single_step_breakpoint() never notices this, and
> calls remove_single_step_breakpoints() to remove the breakpoints.
> Unfortunately that makes us hit the gdb_assert() in there.
>
> This patch makes us avoid this while still making an attempt to catch
> misuse of the interface.

Hmm - this is also true on some GNU/Linux targets, although none that
use software single step (yet - though I think I know how to trigger it
on ARM, some kernel fixes would also be needed).

My question is, is there something more useful we could be doing?
If the single step breakpoint fails, then continuing will make us lose
control. Maybe it should be an error().

--
Daniel Jacobowitz
CodeSourcery