Add the "set style source" command
[deliverable/binutils-gdb.git] / gdb / interps.h
index a689be56253d361c66153879df2bfdebf6345032..1bdc56c83959da28ee7a48b0c7535842382c09ab 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
@@ -74,11 +74,18 @@ public:
   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?  */
@@ -111,7 +118,7 @@ public:
 
   ~scoped_restore_interp ()
   {
-    set_interp (m_interp->name);
+    set_interp (m_interp->name ());
   }
 
   scoped_restore_interp (const scoped_restore_interp &) = delete;
This page took 0.02787 seconds and 4 git commands to generate.