Stepping off breakpoints in non-stop debugging mode (resubmit)

Pedro Alves pedro@codesourcery.com
Thu Apr 10 03:14:00 GMT 2008


This is an update of Jim Blandy's patch described here:

[Stepping off breakpoints in non-stop debugging mode]
http://sourceware.org/ml/gdb/2007-12/msg00064.html

The differences to the earlier patch are:

 - Enable displaced stepping on x86-pc-linux-gnu instead of
   on all x86 targets, for two reasons.  1) x86_64 was
   inheriting the setting, which meant it broke because we
   don't handle any x86_64 specific instructions or modes.
   2) We found that the choice of the a few bytes off of the
   entry point for scratchspace breaks on the Ericsson OS
   we are also implementing non-stop for.  It is reasonable to
   think that is can break on other targets too.  Since this
   is needed for non-stop only, it can be switch on on other
   targets on a need basis.  OTOH, the Ericsson OS doesn't
   really need this, since in that case the thread specific
   breakpoints are handled on the target/stub side.

 - In non-stop mode, we can have more than one
   thread stepping over a breakpoint.  Since the current
   implementation exposes only one scratch space for the
   whole process, we needed to serialize the stepping over
   breakpoints.  If/when a target exposes a scratchspace
   per thread, we can add a gdbarch method/property to
   enable/disable the serialization.

 - There was still one place in the earlier version where
   we were still removing breakpoints from the
   target.  There should be none in this version.

 - Added "maint set can-use-displaced-stepping" -- default on,
   and "set debug displaced" commands.  Documented them.

 - Really tested with non-stop mode this time.


This patch applies on top of Vladimir's "breakpoints always
inserted" patch.

Tested on x86-pc-linux-gnu and x86_64-unknown-linux-gnu to
ensure nothing broke there.

Does it look OK to apply after Vlad's patch has gone in?

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


More information about the Gdb-patches mailing list