summaryrefslogtreecommitdiff
path: root/gdb/dummy-frame.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2015-05-13 20:47:32 +0200
committerJan Kratochvil <jan.kratochvil@redhat.com>2015-05-13 20:47:32 +0200
commit5e9705017f5b257421136b8d7752b9c793335ace (patch)
treeda7d4b8b721cbf9529eea378a337fcf3e625b8ea /gdb/dummy-frame.h
parent1c4eb778a28447d764235b8810d382b40b2a054c (diff)
downloadbinutils-gdb-5e9705017f5b257421136b8d7752b9c793335ace.tar.gz
Call dummy_frame_dtor_ftype also from remove_dummy_frame
There was now a leak-like bug that if dummy_frame "disappeared" by remove_dummy_frame then its destructor was not called. For example in the case of 'compile code' dummy frames the injected objfile would never get freed after some inferior longjmp out of the injected code. gdb/ChangeLog 2015-05-13 Jan Kratochvil <jan.kratochvil@redhat.com> * compile/compile-object-run.c (do_module_cleanup): Add parameter registers_valid. (compile_object_run): Update do_module_cleanup caller. * dummy-frame.c: Include infcall.h. (struct dummy_frame): Update dtor comment. (remove_dummy_frame): Call dtor. (pop_dummy_frame): Update dtor caller. * dummy-frame.h (dummy_frame_dtor_ftype): Add parameter registers_valid.
Diffstat (limited to 'gdb/dummy-frame.h')
-rw-r--r--gdb/dummy-frame.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/dummy-frame.h b/gdb/dummy-frame.h
index ffd3b0ad025..c156b810245 100644
--- a/gdb/dummy-frame.h
+++ b/gdb/dummy-frame.h
@@ -54,8 +54,9 @@ extern void dummy_frame_discard (struct frame_id dummy_id, ptid_t ptid);
extern const struct frame_unwind dummy_frame_unwind;
-/* Destructor for dummy_frame. DATA is supplied by registrant. */
-typedef void (dummy_frame_dtor_ftype) (void *data);
+/* Destructor for dummy_frame. DATA is supplied by registrant.
+ REGISTERS_VALID is 1 for dummy_frame_pop, 0 for dummy_frame_discard. */
+typedef void (dummy_frame_dtor_ftype) (void *data, int registers_valid);
/* Call DTOR with DTOR_DATA when DUMMY_ID frame of thread PTID gets discarded.
Dummy frame with DUMMY_ID must exist. There must be no other call of