aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/corelow.c2
-rw-r--r--gdb/inferior.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b4e3a55..0b8d562 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * corelow.c (core_target::detach): Ensure frame cache and
+ register caches are cleared.
+ inferior.c (exit_inferior_1): Likewise.
+
2019-05-03 Sandra Loosemore <sandra@codesourcery.com>
Tom Tromey <tom@tromey.com>
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 3ce612d..9fcc2d2 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -535,6 +535,8 @@ core_target::detach (inferior *inf, int from_tty)
'this'. */
unpush_target (this);
+ /* Clear the register cache and the frame cache. */
+ registers_changed ();
reinit_frame_cache ();
maybe_say_no_core_file_now (from_tty);
}
diff --git a/gdb/inferior.c b/gdb/inferior.c
index e7b4937..abfef70 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -208,6 +208,10 @@ exit_inferior_1 (struct inferior *inftoex, int silent)
inf->pending_detach = 0;
/* Reset it. */
inf->control = inferior_control_state (NO_STOP_QUIETLY);
+
+ /* Clear the register cache and the frame cache. */
+ registers_changed ();
+ reinit_frame_cache ();
}
void