[PATCH] Displaced stepping (non-stop debugging) support for ARM Linux

Daniel Jacobowitz drow@false.org
Fri Jul 24 02:17:00 GMT 2009


On Wed, Jul 15, 2009 at 07:27:49PM +0100, Julian Brown wrote:
> One possibly dubious part though is the positioning of the
> insert_breakpoints() call in arm-linux-tdep.c:arm_linux_copy_svc():
> without that, the momentary breakpoint used to regain control after a
> sigreturn syscall never actually gets inserted into the debugged
> program, because the displaced-step copy function gets called after
> that normally happens. It should be safe AFAICT, but I may have
> overlooked something.

set_momentary_breakpoint calls update_global_location_list_nothrow.
That's supposed to insert breakpoints.  Here it is:

  if (breakpoints_always_inserted_mode () && should_insert
      && (have_live_inferiors ()
          || (gdbarch_has_global_breakpoints (target_gdbarch))))
    insert_breakpoint_locations ();

I'm guessing that you're using displaced stepping, but don't have
breakpoints always inserted (as they would be in typical use, since
non-stop requires it)?

I wish there were a more robust way to manage this, but I'm not sure
what it would be.  We could do it centrally after setting up displaced
stepping.  What you have seems OK to me.

In fact, both patches look OK to apply.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list