This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Displaced stepping (non-stop debugging) support for ARM Linux
- From: Daniel Jacobowitz <drow at false dot org>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Pedro Alves <pedro at codesourcery dot com>
- Date: Thu, 23 Jul 2009 18:19:31 -0400
- Subject: Re: [PATCH] Displaced stepping (non-stop debugging) support for ARM Linux
- References: <20090120221355.46ac23e6@rex.config> <20090516191910.14820805@rex.config> <20090609173709.GA10846@caradoc.them.org> <200906101559.46860.pedro@codesourcery.com> <20090610150523.GA4472@caradoc.them.org> <20090715192749.718691f1@rex.config>
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