PR cli/21688: Fix multi-line/inline command differentiation
[deliverable/binutils-gdb.git] / gdb / varobj.c
index 5f21d84f594bd1f177e052677d60243b5f4cbece..7bd549d45c59d64eea6a3670e9b20066b94b2a2b 100644 (file)
@@ -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.045946 seconds and 4 git commands to generate.