Target can step over breakpoints itself

Pedro Alves pedro@codesourcery.com
Mon Oct 27 14:19:00 GMT 2008


When adding non-stop debugging support to a target/arch, one of the
most important aspects we need to take care of, is to have a means
to step over breakpoints without removing them from the inferior,
otherwise, other running threads may miss them.  We've added a mechanism
to GDB that does out-of-line single-stepping (displaced stepping), which
we use on linux x86 and ppc.  The smarts to do this are all on the GDB side.

DICOS debug API can take care of magically stepping over software
breakpoints transparently, which means that we don't have to resort to
do displaced stepping on the GDB side.

The attached patch adds a new "StepOverBreakpoints" feature to the
remote protocol to the remote stub can tell GDB that the debug api has
that feature, and exposes that knowledge to the rest of GDB by
adding a new target_ops method (target_can_step_over_breakpoints),
and teaching infrun.c to it doesn't need to do the traditional hold-and-step
dance (remove breakpoints, single-step, insert breakpoints) from the
inferior(s), if the target reports support for stepping over them
itself.

Any objections/thoughts on this?

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: target_can_step_over_breakpoints.diff
Type: text/x-diff
Size: 11088 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20081027/d891cd17/attachment.bin>


More information about the Gdb-patches mailing list