#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);