/* Definitions for dealing with stack frames, for GDB, the GNU debugger.
- Copyright (C) 1986-2017 Free Software Foundation, Inc.
+ Copyright (C) 1986-2018 Free Software Foundation, Inc.
This file is part of GDB.
int artificial_depth;
};
+/* Save and restore the currently selected frame. */
+
+class scoped_restore_selected_frame
+{
+public:
+ /* Save the currently selected frame. */
+ scoped_restore_selected_frame ();
+
+ /* Restore the currently selected frame. */
+ ~scoped_restore_selected_frame ();
+
+ DISABLE_COPY_AND_ASSIGN (scoped_restore_selected_frame);
+
+private:
+
+ /* The ID of the previously selected frame. */
+ struct frame_id m_fid;
+};
+
/* Methods for constructing and comparing Frame IDs. */
/* For convenience. All fields are zero. This means "there is no frame". */
#define FRAME_OBSTACK_CALLOC(NUMBER,TYPE) \
((TYPE *) frame_obstack_zalloc ((NUMBER) * sizeof (TYPE)))
+class readonly_detached_regcache;
/* Create a regcache, and copy the frame's registers into it. */
-std::unique_ptr<struct regcache> frame_save_as_regcache
+std::unique_ptr<readonly_detached_regcache> frame_save_as_regcache
(struct frame_info *this_frame);
extern const struct block *get_frame_block (struct frame_info *,
extern void read_frame_local (struct symbol *sym, struct frame_info *frame,
struct frame_arg *argp);
-extern void info_args_command (char *, int);
+extern void info_args_command (const char *, int);
-extern void info_locals_command (char *, int);
+extern void info_locals_command (const char *, int);
-extern void return_command (char *, int);
+extern void return_command (const char *, int);
/* Set FRAME's unwinder temporarily, so that we can call a sniffer.
If sniffing fails, the caller should be sure to call