+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.
+
2015-05-13 Joel Brobecker <brobecker@adacore.com>
GDB 7.9.1 released.
static dummy_frame_dtor_ftype do_module_cleanup;
static void
-do_module_cleanup (void *arg)
+do_module_cleanup (void *arg, int registers_valid)
{
struct do_module_cleanup *data = arg;
struct objfile *objfile;
data->executedp = NULL;
gdb_assert (!(dtor_found && executed));
if (!dtor_found && !executed)
- do_module_cleanup (data);
+ do_module_cleanup (data, 0);
throw_exception (ex);
}
END_CATCH
#include "gdbcmd.h"
#include "observer.h"
#include "gdbthread.h"
+#include "infcall.h"
struct dummy_frame_id
{
/* The caller's state prior to the call. */
struct infcall_suspend_state *caller_state;
- /* If non-NULL, a destructor that is run when this dummy frame is
- popped. */
+ /* If non-NULL, a destructor that is run when this dummy frame is freed. */
dummy_frame_dtor_ftype *dtor;
/* Arbitrary data that is passed to DTOR. */
{
struct dummy_frame *dummy = *dummy_ptr;
+ if (dummy->dtor != NULL)
+ dummy->dtor (dummy->dtor_data, 0);
+
*dummy_ptr = dummy->next;
discard_infcall_suspend_state (dummy->caller_state);
xfree (dummy);
gdb_assert (ptid_equal (dummy->id.ptid, inferior_ptid));
if (dummy->dtor != NULL)
- dummy->dtor (dummy->dtor_data);
+ dummy->dtor (dummy->dtor_data, 1);
restore_infcall_suspend_state (dummy->caller_state);
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