|
|
689258 |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
689258 |
From: Fedora GDB patches <invalid@email.com>
|
|
|
689258 |
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
689258 |
Subject: gdb-follow-child-stale-parent.patch
|
|
|
689258 |
|
|
|
689258 |
;; Fix regression by python on ia64 due to stale current frame.
|
|
|
689258 |
;;=push+jan
|
|
|
689258 |
|
|
|
689258 |
Problem occurs with python and its get_current_arch () as it selects
|
|
|
689258 |
selected_frame and current_frame while still inferior_ptid is valid for the
|
|
|
689258 |
original parent. But since this place it is already attached and later
|
|
|
689258 |
unwinders try to access it, breaking:
|
|
|
689258 |
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
|
|
|
689258 |
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
|
|
|
689258 |
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
|
|
689258 |
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
|
|
689258 |
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
|
|
689258 |
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
|
|
|
689258 |
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
|
|
|
689258 |
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
|
|
689258 |
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
|
|
689258 |
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
|
|
689258 |
|
|
|
689258 |
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
|
|
689258 |
--- a/gdb/infrun.c
|
|
|
689258 |
+++ b/gdb/infrun.c
|
|
|
689258 |
@@ -752,6 +752,9 @@ follow_fork (void)
|
|
|
689258 |
}
|
|
|
689258 |
else
|
|
|
689258 |
{
|
|
|
689258 |
+ /* Possibly referenced PARENT is no longer valid. */
|
|
|
689258 |
+ reinit_frame_cache ();
|
|
|
689258 |
+
|
|
|
689258 |
/* This pending follow fork event is now handled, one way
|
|
|
689258 |
or another. The previous selected thread may be gone
|
|
|
689258 |
from the lists by now, but if it is still around, need
|