add dummy frame destructor
The compiler code needed a hook into dummy frame destruction, so that
some state could be kept while the inferior call is made and then
destroyed when the inferior call finishes.
This patch adds an optional destructor to dummy frames and a new API
to access it.
gdb/ChangeLog
2014-12-12 Jan Kratochvil <jan.kratochvil@redhat.com>
* dummy-frame.c (struct dummy_frame) <dtor, dtor_data>: New
fields.
(pop_dummy_frame): Call the destructor if it exists.
(register_dummy_frame_dtor, find_dummy_frame_dtor): New
functions.
* dummy-frame.h (dummy_frame_dtor_ftype): New typedef.
(register_dummy_frame_dtor, find_dummy_frame_dtor): Declare.