This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] "single step" atomic instruction sequences as a whole.
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: uweigand at de dot ibm dot com
- Cc: drow at false dot org, gdb-patches at sourceware dot org
- Date: Sat, 14 Apr 2007 10:15:10 +0200 (CEST)
- Subject: Re: [patch] "single step" atomic instruction sequences as a whole.
- References: <200704122043.l3CKhnTB019216@d12av02.megacenter.de.ibm.com>
> Date: Thu, 12 Apr 2007 22:43:49 +0200 (CEST)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
>
> Mark Kettenis wrote:
>
> > I suspect the write_pc call is there to make stepping delay-slot
> > instructions work.
>
> Maybe I'm confused, but I thought alpha didn't have delay slots?
> There is a special gdbarch routine single_step_through_delay for
> targets that have those ...
Duh, you're right. I must have been hacking tto much on sparc64 and
mips64 lately.
> > > I don't have a way to test on alpha-linux unfortunately. Do you?
> >
> > I can test OpenBSD/alpha later this week if necessary.
>
> Thanks for the offer! (I just noticed that Linux/alpha doesn't use
> software single-step anyway, but OpenBSD/alpha does.)
Indeed.
> Would you mind testing this small patch that simply removes the
> write_pc call?
It actually gets rid of a couple of FAILs. So please go ahead and
commit this.
> * alpha-tdep.c (alpha_software_single_step): Do not call write_pc
> when removing single-step breakpoints.
>
> Index: gdb/alpha-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
> retrieving revision 1.163
> diff -u -p -r1.163 alpha-tdep.c
> --- gdb/alpha-tdep.c 12 Apr 2007 14:52:19 -0000 1.163
> +++ gdb/alpha-tdep.c 12 Apr 2007 20:39:08 -0000
> @@ -1521,7 +1521,7 @@ alpha_next_pc (CORE_ADDR pc)
> int
> alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p)
> {
> - static CORE_ADDR next_pc;
> + CORE_ADDR next_pc;
> CORE_ADDR pc;
>
> if (insert_breakpoints_p)
> @@ -1534,7 +1534,6 @@ alpha_software_single_step (enum target_
> else
> {
> remove_single_step_breakpoints ();
> - write_pc (next_pc);
> }
> return 1;
> }