2017-12-10 22:00:49 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
2017-12-04 19:24:00 +00:00
|
|
|
From: Fedora GDB patches <invalid@email.com>
|
|
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
|
Subject: gdb-follow-child-stale-parent.patch
|
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
;; Fix regression by python on ia64 due to stale current frame.
|
|
|
|
;;=push+jan
|
2017-12-04 19:24:00 +00:00
|
|
|
|
2010-01-12 22:15:57 +00:00
|
|
|
Problem occurs with python and its get_current_arch () as it selects
|
|
|
|
selected_frame and current_frame while still inferior_ptid is valid for the
|
|
|
|
original parent. But since this place it is already attached and later
|
|
|
|
unwinders try to access it, breaking:
|
|
|
|
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
|
|
|
|
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
|
|
|
|
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
|
|
|
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
|
|
|
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
|
|
|
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
|
|
|
|
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
|
|
|
|
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
|
|
|
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
|
|
|
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
|
|
|
--- a/gdb/infrun.c
|
|
|
|
+++ b/gdb/infrun.c
|
2018-05-31 18:47:56 +00:00
|
|
|
@@ -752,6 +752,9 @@ follow_fork (void)
|
2010-01-12 22:15:57 +00:00
|
|
|
}
|
|
|
|
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
|