+ return NULL;
+}
+
+/* Pop the dummy frame DUMMY_ID, restoring program state to that before the
+ frame was created.
+ On return reinit_frame_cache has been called.
+ If the frame isn't found, flag an internal error.
+
+ NOTE: This can only pop the one frame, even if it is in the middle of the
+ stack, because the other frames may be for different threads, and there's
+ currently no way to tell which stack frame is for which thread. */
+
+void
+dummy_frame_pop (struct frame_id dummy_id)
+{
+ struct dummy_frame **dp;
+
+ dp = lookup_dummy_frame (dummy_id);
+ gdb_assert (dp != NULL);
+
+ pop_dummy_frame (dp);
+}
+
+/* There may be stale dummy frames, perhaps left over from when a longjump took
+ us out of a function that was called by the debugger. Clean them up at
+ least once whenever we start a new inferior. */
+
+static void
+cleanup_dummy_frames (struct target_ops *target, int from_tty)
+{
+ while (dummy_frame_stack != NULL)
+ remove_dummy_frame (&dummy_frame_stack);