diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-01-21 18:56:43 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-01-21 18:56:43 +0000 |
commit | 7bfc943420917444b86391e4f7bf96e79150aa21 (patch) | |
tree | ab4656f486c19164b41f5f6d55822ada3ef5ccd4 /gdb/doc | |
parent | 6da78614a34009388ab8af71cd26f59a451d486a (diff) | |
download | gdb-7bfc943420917444b86391e4f7bf96e79150aa21.zip gdb-7bfc943420917444b86391e4f7bf96e79150aa21.tar.gz gdb-7bfc943420917444b86391e4f7bf96e79150aa21.tar.bz2 |
move handing of "set interactive-mode" to gdb_has_a_terminal
The real purpose of this setting is really to override what the debugger
would otherwise guess from checking the stdin settings. So it seems
more natural to see this setting being handled inside gdb_has_a_terminal
rather than input_is_terminal (which checks for other things, such as
whether the input is stdin, for instance).
This patch also adjust the command help and the associated section in
the GDB Manual to be a little clearer about that.
gdb/ChangeLog:
* inflow.c: Include "gdbcmd.h".
(interactive_mode): New static global, moved here from top.c.
(show_interactive_mode): New function, moved here from top.c.
use gdb_has_a_terminal instead of input_from_terminal_p to
determine the current mode.
(gdb_has_a_terminal): Add handling of the "iteractive-mode"
setting.
(_initialize_inflow): Add the "set/show interactive-mode"
commands. Moved here from top.c, after having adjusted slightly
the help text.
* top.c (interactive_mode, show_interactive_mode): Delete, moved
to inflow.c.
(input_from_terminal_p): Remove handling of "interactive-mode"
setting, moved to infow.c.
(init_main): Remove creation of the "set/show interactive-mode"
commands, moved to inflow.c.
gdb/doc/ChangeLog:
* gdb.texinfo (Other Misc Settings): Rework part of the
documentation of the "set interactive mode" command.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 25c4758..f926ebc 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2011-01-21 Joel Brobecker <brobecker@adacore.com> + + * gdb.texinfo (Other Misc Settings): Rework part of the + documentation of the "set interactive mode" command. + 2011-01-19 Tom Tromey <tromey@redhat.com> * gdb.texinfo (Threads): Document thread name output and `thread diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 4da4e55..cc2391b 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20040,10 +20040,14 @@ Displays the current state of XML debugging messages. @table @code @kindex set interactive-mode @item set interactive-mode -If @code{on}, forces @value{GDBN} to operate interactively. -If @code{off}, forces @value{GDBN} to operate non-interactively, -If @code{auto} (the default), @value{GDBN} guesses which mode to use, -based on whether the debugger was started in a terminal or not. +If @code{on}, forces @value{GDBN} to assume that GDB was started +in a terminal. In practice, this means that @value{GDBN} should wait +for the user to answer queries generated by commands entered at +the command prompt. If @code{off}, forces @value{GDBN} to operate +in the opposite mode, and it uses the default answers to all queries. +If @code{auto} (the default), @value{GDBN} tries to determine whether +its standard input is a terminal, and works in interactive-mode if it +is, non-interactively otherwise. In the vast majority of cases, the debugger should be able to guess correctly which mode should be used. But this setting can be useful |