This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA 1/3] Clear frame cache when loading or unloading a JIT unwinder


It seemed to me that gdb should flush the frame cache when loading or
unloading a JIT unwinder.  This makes testing a JIT unwinder a bit
simpler.

jit-reader-load apparently has no tests in-tree, so I didn't add a new
test here.

2016-06-09  Tom Tromey  <tom@tromey.com>

	* jit.c (jit_reader_load_command, jit_reader_unload_command): Call
	reinit_frame_cache.
---
 gdb/ChangeLog | 5 +++++
 gdb/jit.c     | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 335476b..04609c0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-09  Tom Tromey  <tom@tromey.com>
+
+	* jit.c (jit_reader_load_command, jit_reader_unload_command): Call
+	reinit_frame_cache.
+
 2016-06-10  Tom Tromey  <tom@tromey.com>
 
 	* gdbtypes.c (arch_type, arch_integer_type, arch_character_type)
diff --git a/gdb/jit.c b/gdb/jit.c
index 9fd5ae6..9bb2da5 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -218,6 +218,7 @@ jit_reader_load_command (char *args, int from_tty)
   prev_cleanup = make_cleanup (xfree, so_name);
 
   loaded_jit_reader = jit_reader_load (so_name);
+  reinit_frame_cache ();
   do_cleanups (prev_cleanup);
 }
 
@@ -234,6 +235,7 @@ jit_reader_unload_command (char *args, int from_tty)
   gdb_dlclose (loaded_jit_reader->handle);
   xfree (loaded_jit_reader);
   loaded_jit_reader = NULL;
+  reinit_frame_cache ();
 }
 
 /* Per-program space structure recording which objfile has the JIT
-- 
2.5.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]