linux-nat: Remove unused parameter
[deliverable/binutils-gdb.git] / gdb / varobj.c
index f5d1cbf011ebbe91df755bf653fe1735a28f4e81..7bd549d45c59d64eea6a3670e9b20066b94b2a2b 100644 (file)
@@ -50,7 +50,7 @@ show_varobjdebug (struct ui_file *file, int from_tty,
 }
 
 /* String representations of gdb's format codes.  */
-char *varobj_format_string[] =
+const char *varobj_format_string[] =
   { "natural", "binary", "decimal", "hexadecimal", "octal", "zero-hexadecimal" };
 
 /* True if we want to allow Python-based pretty-printing.  */
@@ -2218,14 +2218,13 @@ value_of_root_1 (struct varobj **var_handle)
   struct value *new_val = NULL;
   struct varobj *var = *var_handle;
   int within_scope = 0;
-  struct cleanup *back_to;
                                                                 
   /*  Only root variables can be updated...  */
   if (!is_root_p (var))
     /* Not a root var.  */
     return NULL;
 
-  back_to = make_cleanup_restore_current_thread ();
+  scoped_restore_current_thread restore_thread;
 
   /* Determine whether the variable is still around.  */
   if (var->root->valid_block == NULL || var->root->floating)
@@ -2264,8 +2263,6 @@ value_of_root_1 (struct varobj **var_handle)
       END_CATCH
     }
 
-  do_cleanups (back_to);
-
   return new_val;
 }
 
This page took 0.025731 seconds and 4 git commands to generate.