diff options
author | Pedro Alves <palves@redhat.com> | 2013-06-28 17:06:14 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-06-28 17:06:14 +0000 |
commit | d32dc48ed4bf13a6974ccc12b0e58aa434821d22 (patch) | |
tree | b29a31e570217a3a0c277619506010b56cf0b331 /gdb | |
parent | a69ed7f7aa6fb202509361b02d43838270cc65a0 (diff) | |
download | gdb-d32dc48ed4bf13a6974ccc12b0e58aa434821d22.zip gdb-d32dc48ed4bf13a6974ccc12b0e58aa434821d22.tar.gz gdb-d32dc48ed4bf13a6974ccc12b0e58aa434821d22.tar.bz2 |
infrun.c: Move non_stop_1 etc., higher up in file.
The "non_stop_1" global is out of place, mixed with the observer bits.
This moves all the non-stop user-interface-related bits together.
gdb/
2013-06-28 Pedro Alves <palves@redhat.com>
* infrun.c (non_stop, non_stop_1, set_non_stop, show_non_stop):
Move higher up in file.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/infrun.c | 55 |
2 files changed, 32 insertions, 28 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ce8c336..5bd25df 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-06-28 Pedro Alves <palves@redhat.com> + + * infrun.c (non_stop, non_stop_1, set_non_stop, show_non_stop): + Move higher up in file. + 2013-06-28 Tom Tromey <tromey@redhat.com> * tracepoint.c (deprecated_readline_begin_hook) diff --git a/gdb/infrun.c b/gdb/infrun.c index 8fb219a..e95f81f 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -181,12 +181,37 @@ set_disable_randomization (char *args, int from_tty, "this platform.")); } +/* User interface for non-stop mode. */ + +int non_stop = 0; +static int non_stop_1 = 0; + +static void +set_non_stop (char *args, int from_tty, + struct cmd_list_element *c) +{ + if (target_has_execution) + { + non_stop_1 = non_stop; + error (_("Cannot change this setting while the inferior is running.")); + } + + non_stop = non_stop_1; +} + +static void +show_non_stop (struct ui_file *file, int from_tty, + struct cmd_list_element *c, const char *value) +{ + fprintf_filtered (file, + _("Controlling the inferior in non-stop mode is %s.\n"), + value); +} + /* "Observer mode" is somewhat like a more extreme version of non-stop, in which all GDB operations that might affect the target's execution have been disabled. */ -static int non_stop_1 = 0; - int observer_mode = 0; static int observer_mode_1 = 0; @@ -7085,32 +7110,6 @@ show_exec_direction_func (struct ui_file *out, int from_tty, } } -/* User interface for non-stop mode. */ - -int non_stop = 0; - -static void -set_non_stop (char *args, int from_tty, - struct cmd_list_element *c) -{ - if (target_has_execution) - { - non_stop_1 = non_stop; - error (_("Cannot change this setting while the inferior is running.")); - } - - non_stop = non_stop_1; -} - -static void -show_non_stop (struct ui_file *file, int from_tty, - struct cmd_list_element *c, const char *value) -{ - fprintf_filtered (file, - _("Controlling the inferior in non-stop mode is %s.\n"), - value); -} - static void show_schedule_multiple (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |