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

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