internal error when setting watchpoints in programs with fork() on ppc
Edjunior Barbosa Machado
emachado@linux.vnet.ibm.com
Fri Nov 4 22:17:00 GMT 2011
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
More information about the Gdb-patches
mailing list