From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org, jan.kratochvil@redhat.com
Subject: internal error when setting watchpoints in programs with fork() on ppc
Date: Fri, 04 Nov 2011 22:17:00 -0000 [thread overview]
Message-ID: <4EB46474.2040206@linux.vnet.ibm.com> (raw)
Hi,
testing upstream gdb, I'm facing this internal error when running gdb.threads/watchpoint-fork.exp testcase (from this non-upstreamed patch http://sourceware.org/ml/gdb-patches/2010-12/msg00043.html, found in gdb from Fedora and enterprise distros) on ppc64, more specifically in the `set follow-fork-mode child' part of the test:
../../gdb.git/gdb/frame.c:2375: internal-error: frame_cleanup_after_sniffer: Assertion `frame->prologue_cache == NULL' failed.
Actually, noticed that before this error, gdb fails to read r31 due to a wrong pid when issuing ptrace call on fetch_register() from ppc-linux-nat.c. This gdb-follow-child-stale-parent.patch from Jan Kratochvil (http://web.archiveorange.com/archive/v/iRKxrvg3CBOJl9wyV0pi, attached bellow) fixes this issue. Does this look ok for FSF gdb as well?
Thanks!
--
Edjunior
ps: since this is a patch made by Jan, I didn't add the changelog entry yet
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 7ec0788..d8f89f5 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -506,6 +506,9 @@ follow_fork (void)
}
else
{
+ /* Possibly referenced PARENT is no longer valid. */
+ reinit_frame_cache ();
+
/* This pending follow fork event is now handled, one way
or another. The previous selected thread may be gone
from the lists by now, but if it is still around, need
next reply other threads:[~2011-11-04 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 22:17 Edjunior Barbosa Machado [this message]
2011-11-04 22:52 ` Pedro Alves
2011-11-06 23:00 ` Jan Kratochvil
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=4EB46474.2040206@linux.vnet.ibm.com \
--to=emachado@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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