From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc][1/13] Eliminate read_register: write_register in solib-sunos.c
Date: Wed, 13 Jun 2007 22:11:00 -0000 [thread overview]
Message-ID: <200706132211.l5DMB2qW016770@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20070612134525.GB7815@caradoc.them.org> from "Daniel Jacobowitz" at Jun 12, 2007 09:45:25 AM
Daniel Jacobowitz wrote:
> On Thu, Jun 07, 2007 at 10:57:11PM +0200, Ulrich Weigand wrote:
> > this patch eliminates the use of write_register in solib-sunos.c.
> > As discussed when I've originally posted the patch, the whole
> > "if (DECR_PC_AFTER_BREAK)" block is questionable, and the correct
> > solution might be to completely remove it.
>
> I'd prefer that - unfortunately I believe Mark is travelling now
> so it may be a while before he can test it. I suppose that if you're
> feeling really brave, you could try running OpenBSD in aranym.
> Actually, i386-openbsd3.3 in qemu would probably be much easier.
qemu does work pretty well, indeed. However, testing i386-openbsd3.3
there confirmed that the "if (DECR_PC_AFTER_BREAK)" block is actually
required. This is because the breakpoint is inserted by the *dynamic
linker* itself, and is therefore not on GDB's breakpoint list, which
is why adjust_pc_after_break doesn't recognize it.
This is in fact even noted in a comment in solib-sunos.c:
For SunOS, there is a special flag location (in_debugger) which we
set to 1. When the dynamic linker sees this flag set, it will set
a breakpoint at a location known only to itself, after saving the
original contents of that place and the breakpoint address itself,
in it's own internal structures. When we resume the inferior, it
will eventually take a SIGTRAP when it runs into the breakpoint.
We handle this (in a different place) by restoring the contents of
the breakpointed location (which is only known after it stops),
chasing around to locate the shared libraries that have been
loaded, then resuming.
So I guess it's back to my original patch ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
prev parent reply other threads:[~2007-06-13 22:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 20:57 Ulrich Weigand
2007-06-12 13:45 ` Daniel Jacobowitz
2007-06-13 22:11 ` Ulrich Weigand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200706132211.l5DMB2qW016770@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox