aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-10-16 17:26:09 -0600
committerTom Tromey <tom@tromey.com>2017-10-19 15:58:11 -0600
commit54f70bc14586878ee14891ecb11efb8a90405874 (patch)
tree6553f42c303cf2756cb6196bb7f1ad62cfe93860 /gdb/mi
parent49a4ce2eae231ae627ab9a312256c6e402b5a27e (diff)
downloadgdb-54f70bc14586878ee14891ecb11efb8a90405874.zip
gdb-54f70bc14586878ee14891ecb11efb8a90405874.tar.gz
gdb-54f70bc14586878ee14891ecb11efb8a90405874.tar.bz2
Remove cleanups from prepare_execute_command
This changes prepare_execute_command to return a scoped_value_mark rather than a cleanup. ChangeLog 2017-10-19 Tom Tromey <tom@tromey.com> * mi/mi-main.c (mi_cmd_execute): Update. * top.h (prepare_execute_command): Return scoped_value_mark. * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN. Add move constructor. * top.c (prepare_execute_command): Return scoped_value_mark. (execute_command): Update.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 8dc955d..3caf904 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -2095,9 +2095,7 @@ mi_execute_command (const char *cmd, int from_tty)
static void
mi_cmd_execute (struct mi_parse *parse)
{
- struct cleanup *cleanup;
-
- cleanup = prepare_execute_command ();
+ scoped_value_mark cleanup = prepare_execute_command ();
if (parse->all && parse->thread_group != -1)
error (_("Cannot specify --thread-group together with --all"));
@@ -2189,7 +2187,6 @@ mi_cmd_execute (struct mi_parse *parse)
error_stream (stb);
}
- do_cleanups (cleanup);
}
/* FIXME: This is just a hack so we can get some extra commands going.