Blame SOURCES/gdb-follow-child-stale-parent.patch

e1d87d
Problem occurs with python and its get_current_arch () as it selects
e1d87d
selected_frame and current_frame while still inferior_ptid is valid for the
e1d87d
original parent.  But since this place it is already attached and later
e1d87d
unwinders try to access it, breaking:
e1d87d
  -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
e1d87d
  -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
e1d87d
  -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
e1d87d
  -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
e1d87d
  -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
e1d87d
  +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
e1d87d
  +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
e1d87d
  +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
e1d87d
  +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
e1d87d
  +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
e1d87d
e1d87d
--- ./gdb/infrun.c	2009-12-21 20:26:30.000000000 +0100
e1d87d
+++ ./gdb/infrun.c	2009-12-21 20:26:11.000000000 +0100
e1d87d
@@ -375,6 +375,9 @@ follow_fork (void)
e1d87d
 	  }
e1d87d
 	else
e1d87d
 	  {
e1d87d
+	    /* Possibly referenced PARENT is no longer valid.  */
e1d87d
+	    reinit_frame_cache ();
e1d87d
+
e1d87d
 	    /* This pending follow fork event is now handled, one way
e1d87d
 	       or another.  The previous selected thread may be gone
e1d87d
 	       from the lists by now, but if it is still around, need