From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: mark.kettenis@xs4all.nl (Mark Kettenis), gdb-patches@sourceware.org
Subject: Re: [rfc] Eliminate write_register from solib-sunos.c
Date: Fri, 15 Jun 2007 22:13:00 -0000 [thread overview]
Message-ID: <200706152212.l5FMCtfO002456@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20070615212838.GA5986@caradoc.them.org> from "Daniel Jacobowitz" at Jun 15, 2007 05:28:38 PM
Daniel Jacobowitz wrote:
> On Fri, Jun 15, 2007 at 06:58:29PM +0200, Ulrich Weigand wrote:
> > 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.
>
> If you have a moment, could you add an explanation of why this is
> necessary to the code?
Certainly. I've committed the following patch.
Bye,
Ulrich
ChangeLog:
* solib-sunos.c (sunos_solib_create_inferior_hook): Add comment
explaining why the PC adjustment code is necessary.
diff -urNp gdb-orig/gdb/solib-sunos.c gdb-head/gdb/solib-sunos.c
--- gdb-orig/gdb/solib-sunos.c 2007-06-15 21:14:47.675137191 +0200
+++ gdb-head/gdb/solib-sunos.c 2007-06-16 00:07:15.018979384 +0200
@@ -775,7 +775,13 @@ sunos_solib_create_inferior_hook (void)
/* We are now either at the "mapping complete" breakpoint (or somewhere
else, a condition we aren't prepared to deal with anyway), so adjust
the PC as necessary after a breakpoint, disable the breakpoint, and
- add any shared libraries that were mapped in. */
+ add any shared libraries that were mapped in.
+
+ Note that adjust_pc_after_break did not perform any PC adjustment,
+ as the breakpoint the inferior just hit was not inserted by GDB,
+ but by the dynamic loader itself, and is therefore not found on
+ the GDB software break point list. Thus we have to adjust the
+ PC here. */
if (gdbarch_decr_pc_after_break (current_gdbarch))
{
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2007-06-15 22:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 0:31 Ulrich Weigand
2007-05-13 23:55 ` Daniel Jacobowitz
2007-05-14 15:01 ` Ulrich Weigand
2007-05-14 15:15 ` Mark Kettenis
2007-05-14 20:53 ` Ulrich Weigand
2007-06-04 18:53 ` Ulrich Weigand
2007-06-15 16:46 ` Mark Kettenis
2007-06-15 16:58 ` Ulrich Weigand
2007-06-15 21:22 ` Mark Kettenis
2007-06-15 21:28 ` Daniel Jacobowitz
2007-06-15 22:13 ` Ulrich Weigand [this message]
2007-05-14 15:21 ` Daniel Jacobowitz
2007-05-14 20:28 ` Ulrich Weigand
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=200706152212.l5FMCtfO002456@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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