aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-06-28 16:19:07 +0000
committerDaniel Jacobowitz <drow@false.org>2003-06-28 16:19:07 +0000
commit0fac0b4199c69f27906e7343e434dd0b98e5163e (patch)
tree15f8c0cc45939f9a12172feaf65f5bdc629ac6c8 /gdb/doc
parent1579bae1cd094ed9b986d2128997953600ca910d (diff)
downloadgdb-0fac0b4199c69f27906e7343e434dd0b98e5163e.zip
gdb-0fac0b4199c69f27906e7343e434dd0b98e5163e.tar.gz
gdb-0fac0b4199c69f27906e7343e434dd0b98e5163e.tar.bz2
./
* cli/cli-logging.c: New file. * cli-out.c (struct ui_out_data): Add original_stream. (cli_redirect): New function. (cli_ui_out_impl): Add cli_redirect. (cli_out_new): Initialize original_stream. * ui-out.c (default_ui_out_impl): Add NULL for redirect member. (uo_redirect, ui_out_redirect): New. * ui-out.h (struct ui_out_impl): Add redirect member. (redirect_ftype): New. (ui_out_redirect): Add prototype. * Makefile.in: Add rules for cli-logging.c. * NEWS: Mention "set logging". mi/ * mi-out.c (mi_ui_out_impl): Add NULL for redirect member. tui/ * tui-out.c (tui_ui_out_impl): Add NULL for redirect member. doc/ * gdb.texinfo (Logging output): New chapter.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo27
2 files changed, 31 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 3d39601..fe7da20 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-28 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Logging output): New chapter.
+
2003-06-24 Joel Brobecker <brobecker@gnat.com>
* gdb.texinfo (Unsupported languages): New section.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 05715e1..e6da37c 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -757,6 +757,7 @@ type @kbd{quit} or @kbd{C-d} to exit.
* Invoking GDB:: How to start @value{GDBN}
* Quitting GDB:: How to quit @value{GDBN}
* Shell Commands:: How to use shell commands inside @value{GDBN}
+* Logging output:: How to log @value{GDBN}'s output to a file
@end menu
@node Invoking GDB
@@ -1210,6 +1211,32 @@ Execute the @code{make} program with the specified
arguments. This is equivalent to @samp{shell make @var{make-args}}.
@end table
+@node Logging output
+@section Logging output
+@cindex logging @value{GDBN} output
+
+You may want to save the output of @value{GDBN} commands to a file.
+There are several commands to control @value{GDBN}'s logging.
+
+@table @code
+@kindex set logging
+@item set logging on
+Enable logging.
+@item set logging off
+Disable logging.
+@item set logging file @var{file}
+Change the name of the current logfile. The default logfile is @file{gdb.txt}.
+@item set logging overwrite [on|off]
+By default, @value{GDBN} will append to the logfile. Set @code{overwrite} if
+you want @code{set logging on} to overwrite the logfile instead.
+@item set logging redirect [on|off]
+By default, @value{GDBN} output will go to both the terminal and the logfile.
+Set @code{redirect} if you want output to go only to the log file.
+@kindex show logging
+@item show logging
+Show the current values of the logging settings.
+@end table
+
@node Commands
@chapter @value{GDBN} Commands