This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] "single step" atomic instruction sequences as a whole on PPC
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: Emi SUZUKI <emi-suzuki at tjsys dot co dot jp>, jan dot kratochvil at redhat dot com, luisgpm at linux dot vnet dot ibm dot com, gdb-patches at sourceware dot org
- Date: Thu, 10 May 2007 19:25:17 -0400
- Subject: Re: [RFC] "single step" atomic instruction sequences as a whole on PPC
- References: <20070510213624.GA2822@caradoc.them.org> <200705102258.l4AMwSF4026578@d12av02.megacenter.de.ibm.com>
On Fri, May 11, 2007 at 12:58:28AM +0200, Ulrich Weigand wrote:
> Daniel Jacobowitz wrote:
> > On Thu, May 10, 2007 at 11:30:53PM +0200, Ulrich Weigand wrote:
> > > This looks just like a problem we fixed for the combined debugger;
> > > cancel_breakpoints_callback should cancel SIGTRAP events caused by
> > > software single-step breakpoints just the same as those caused by
> > > other breakpoints.
> >
> > Maybe it would be more elegant to anticipate the day that single step
> > breakpoints are completely normal: make breakpoint_inserted_here_p
> > check them? This is already the only caller.
>
> Good point. Something like the patch below? I've also added the
> check to software_breakpoint_inserted_here_p; that seemed to make
> more sense that not.
>
> (I'm suspicious about adjust_pc_after_break, the only caller of
> software_breakpoint_inserted_here_p anyway; I think this may no
> longer be correct after the software single-step changes ...)
Yes, while I was checking for callers of breakpoint_inserted_here_p
I noticed that. There's no way this is correct any more; it only
works because PowerPC has DECR_PC_AFTER_BREAK == 0 and all other
targets have a software_single_step routine which always returns
the same value.
I think your patch is OK. I suspect that it means the
singlestep_breakpoints_inserted_p check in adjust_pc_after_break is
now obsolete; what do you think? That lets the function simplify a
bit further.
--
Daniel Jacobowitz
CodeSourcery