Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* internal error when setting watchpoints in programs with fork() on ppc
@ 2011-11-04 22:17 Edjunior Barbosa Machado
  2011-11-04 22:52 ` Pedro Alves
  2011-11-06 23:00 ` Jan Kratochvil
  0 siblings, 2 replies; 3+ messages in thread
From: Edjunior Barbosa Machado @ 2011-11-04 22:17 UTC (permalink / raw)
  To: gdb-patches, jan.kratochvil

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: internal error when setting watchpoints in programs with fork() on ppc
  2011-11-04 22:17 internal error when setting watchpoints in programs with fork() on ppc Edjunior Barbosa Machado
@ 2011-11-04 22:52 ` Pedro Alves
  2011-11-06 23:00 ` Jan Kratochvil
  1 sibling, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2011-11-04 22:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Edjunior Barbosa Machado, jan.kratochvil

On Friday 04 November 2011 22:17:24, Edjunior Barbosa Machado wrote:
> 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?

I really couldn't tell what was the real problem from this description.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: internal error when setting watchpoints in programs with fork() on ppc
  2011-11-04 22:17 internal error when setting watchpoints in programs with fork() on ppc Edjunior Barbosa Machado
  2011-11-04 22:52 ` Pedro Alves
@ 2011-11-06 23:00 ` Jan Kratochvil
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kratochvil @ 2011-11-06 23:00 UTC (permalink / raw)
  To: Edjunior Barbosa Machado; +Cc: gdb-patches

On Fri, 04 Nov 2011 23:17:24 +0100, Edjunior Barbosa Machado wrote:
> 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:

It is difficult to push patches which make sense only with off-trunk patches.

Preparing upstreaming of forgotten:
	[patch 0/4] hw watchpoints across fork() + multi-inf
	http://sourceware.org/ml/gdb-patches/2010-12/msg00041.html

Unfortunately facing various unrelated bugs trying to make it compatible also
with gdbserver so I may rather limit it to linux-nat again.


Thanks,
Jan


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-06 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-04 22:17 internal error when setting watchpoints in programs with fork() on ppc Edjunior Barbosa Machado
2011-11-04 22:52 ` Pedro Alves
2011-11-06 23:00 ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox