/* Manages interpreters for GDB, the GNU debugger.
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2019 Free Software Foundation, Inc.
Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
virtual bool supports_command_editing ()
{ return false; }
+ const char *name () const
+ {
+ return m_name;
+ }
+
/* This is the name in "-i=" and "set interpreter". */
- const char *name;
+private:
+ char *m_name;
/* Interpreters are stored in a linked list, this is the next
one... */
+public:
struct interp *next;
/* Has the init method been run? */
interpreter fails to initialize. */
extern void set_top_level_interpreter (const char *name);
-extern struct ui_out *interp_ui_out (struct interp *interp);
-extern const char *interp_name (struct interp *interp);
-
/* Temporarily set the current interpreter, and reset it on
destruction. */
class scoped_restore_interp
~scoped_restore_interp ()
{
- set_interp (interp_name (m_interp));
+ set_interp (m_interp->name ());
}
scoped_restore_interp (const scoped_restore_interp &) = delete;