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

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