aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 5f21d84..7bd549d 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -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;
}