aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-01-23 17:11:50 +0000
committerPedro Alves <palves@redhat.com>2012-01-23 17:11:50 +0000
commit050a2e1dabbaf403d76476e890413c60ffec9b39 (patch)
tree92eecdab7ec53cbfbbe41a382cc9a18a146aa245 /gdb/top.c
parent01b1789443badeda4f875ed61a194ca419982622 (diff)
downloadgdb-050a2e1dabbaf403d76476e890413c60ffec9b39.zip
gdb-050a2e1dabbaf403d76476e890413c60ffec9b39.tar.gz
gdb-050a2e1dabbaf403d76476e890413c60ffec9b39.tar.bz2
gdb/
2012-01-23 Pedro Alves <palves@redhat.com> * top.c (caution): Update comment. (execute_command): Don't consider the current value of `caution'. gdb/testsuite/ 2012-01-23 Pedro Alves <palves@redhat.com> * gdb.base/call-signal-resume.exp: Allow output after "return".
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/top.c b/gdb/top.c
index c4e913d..346d73b 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -98,9 +98,11 @@ int use_windows = 0;
extern char lang_frame_mismatch_warn[]; /* language.c */
-/* Flag for whether we want all the "from_tty" gubbish printed. */
+/* Flag for whether we want to confirm potentially dangerous
+ operations. Default is yes. */
+
+int caution = 1;
-int caution = 1; /* Default is yes, sigh. */
static void
show_caution (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
@@ -471,13 +473,13 @@ execute_command (char *p, int from_tty)
if (c->class == class_user)
execute_user_command (c, arg);
else if (c->type == set_cmd || c->type == show_cmd)
- do_setshow_command (arg, from_tty & caution, c);
+ do_setshow_command (arg, from_tty, c);
else if (!cmd_func_p (c))
error (_("That is not a command, just a help topic."));
else if (deprecated_call_command_hook)
- deprecated_call_command_hook (c, arg, from_tty & caution);
+ deprecated_call_command_hook (c, arg, from_tty);
else
- cmd_func (c, arg, from_tty & caution);
+ cmd_func (c, arg, from_tty);
/* If the interpreter is in sync mode (we're running a user
command's list, running command hooks or similars), and we