This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Eliminate write_register from solib-sunos.c
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: mark dot kettenis at xs4all dot nl (Mark Kettenis)
- Cc: drow at false dot org, gdb-patches at sourceware dot org
- Date: Fri, 15 Jun 2007 18:58:29 +0200 (CEST)
- Subject: Re: [rfc] Eliminate write_register from solib-sunos.c
Mark Kettenis wrote:
> > Date: Mon, 4 Jun 2007 20:53:46 +0200 (CEST)
> > From: "Ulrich Weigand" <uweigand@de.ibm.com>
> >
> > Mark Kettenis wrote:
> >
> > > There are some a.out BSD targets that use solib-sunos.o. In
> > > particular OpenBSD/m68k still uses it. Interestingly enough, that
> > > target sets DECR_PC_AFTER_BREAK to 2. I'll fire up my Quadra 800 and
> > > investigate somewhere later this week.
> >
> > Did you get around to investigate this?
>
> I started things but didn't finish. And now I've forgotten what
> exactly it was that needed to be tested :(. Can you refresh my mind?
The question was whether that "if (DECR_PC_AFTER_BREAK)" block in
solib-sunos.c was in fact correct, or whether is should be removed.
As Dan suggested, I've in the meantime investigated that issue on
i386-openbsd3.3 under qemu, and found out that this block *is*
correct, because the breakpoint that is hit here was not actually
installed by GDB, but by the dynamic loader itself:
http://sourceware.org/ml/gdb-patches/2007-06/msg00276.html
So, if that's OK with you, I'd like to commit my original patch
that leaves the "if (DECR_PC_AFTER_BREAK)" block in, and simply
replaces the write_register call with write_pc. I've now tested
that patch on my i386-openbsd3.3 setup with no regressions.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com