* RFC: "set logging"
@ 2003-06-22 20:53 Daniel Jacobowitz
2003-06-22 21:33 ` Andrew Cagney
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-06-22 20:53 UTC (permalink / raw)
To: gdb-patches
As discussed earlier:
set logging on [FILE]
set logging off
set logging overwrite [I changed the default to append]
set logging redirect
set logging file
show logging
I decided that one-off command logging was really a different class of thing
from this patch, which is straight output logging, not really script-useful
redirection. So that's gone.
Is this OK? Any comments? Docs OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-06-22 Daniel Jacobowitz <drow@mvista.com>
* 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.
* top.c (handle_redirections, pop_output_files): New functions.
(set_logging_help, set_logging_command, show_logging_command): New
functions.
(init_main): Create "set logging" and "show logging" commands.
2003-06-22 Daniel Jacobowitz <drow@mvista.com>
* mi-out.c (mi_ui_out_impl): Add NULL for redirect member.
2003-06-22 Daniel Jacobowitz <drow@mvista.com>
* tui-out.c (tui_ui_out_impl): Add NULL for redirect member.
2003-06-22 Daniel Jacobowitz <drow@mvista.com>
* gdb.texinfo (Logging output): New chapter.
Index: cli-out.c
===================================================================
RCS file: /cvs/src/src/gdb/cli-out.c,v
retrieving revision 1.16
diff -u -p -r1.16 cli-out.c
--- cli-out.c 8 Mar 2003 20:04:27 -0000 1.16
+++ cli-out.c 22 Jun 2003 20:47:08 -0000
@@ -31,6 +31,7 @@
struct ui_out_data
{
struct ui_file *stream;
+ struct ui_file *original_stream;
int suppress_output;
};
typedef struct ui_out_data cli_out_data;
@@ -64,6 +65,7 @@ static void cli_message (struct ui_out *
const char *format, va_list args);
static void cli_wrap_hint (struct ui_out *uiout, char *identstring);
static void cli_flush (struct ui_out *uiout);
+static int cli_redirect (struct ui_out *uiout, struct ui_file *outstream);
/* This is the CLI ui-out implementation functions vector */
@@ -87,6 +89,7 @@ static struct ui_out_impl cli_ui_out_imp
cli_message,
cli_wrap_hint,
cli_flush,
+ cli_redirect,
0, /* Does not need MI hacks (i.e. needs CLI hacks). */
};
@@ -324,6 +327,24 @@ cli_flush (struct ui_out *uiout)
gdb_flush (data->stream);
}
+int
+cli_redirect (struct ui_out *uiout, struct ui_file *outstream)
+{
+ struct ui_out_data *data = ui_out_data (uiout);
+ if (outstream != NULL)
+ {
+ data->original_stream = data->stream;
+ data->stream = outstream;
+ }
+ else if (data->original_stream != NULL)
+ {
+ data->stream = data->original_stream;
+ data->original_stream = NULL;
+ }
+
+ return 0;
+}
+
/* local functions */
/* Like cli_field_fmt, but takes a variable number of args
@@ -362,6 +383,7 @@ cli_out_new (struct ui_file *stream)
cli_out_data *data = XMALLOC (cli_out_data);
data->stream = stream;
+ data->original_stream = NULL;
data->suppress_output = 0;
return ui_out_new (&cli_ui_out_impl, data, flags);
}
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.73
diff -u -p -r1.73 top.c
--- top.c 8 Jun 2003 18:27:14 -0000 1.73
+++ top.c 22 Jun 2003 20:47:09 -0000
@@ -1746,6 +1746,224 @@ dont_repeat_command (char *ignored, int
necessarily reading from stdin. */
}
\f
+/* Functions and variables for gdb output redirection. */
+
+/* These hold the pushed copies of the gdb output files.
+ If NULL then nothing has yet been pushed. */
+static struct ui_file *saved_stdout;
+static struct ui_file *saved_stderr;
+static struct ui_file *saved_stdlog;
+static struct ui_file *saved_stdtarg;
+static char *saved_filename;
+
+static char *logging_filename;
+int logging_overwrite, logging_redirect;
+
+/* If we've pushed output files, close them and pop them. */
+static void
+pop_output_files ()
+{
+ /* Only delete one of the files -- they are all set to the same
+ value. */
+ ui_file_delete (gdb_stdout);
+ gdb_stdout = saved_stdout;
+ gdb_stderr = saved_stderr;
+ gdb_stdlog = saved_stdlog;
+ gdb_stdtarg = saved_stdtarg;
+ saved_stdout = NULL;
+ saved_stderr = NULL;
+ saved_stdlog = NULL;
+ saved_stdtarg = NULL;
+
+ ui_out_redirect (uiout, NULL);
+}
+
+/* This is a helper for the `set logging' command. */
+static void
+handle_redirections (int from_tty)
+{
+ struct ui_file *output;
+
+ if (saved_filename != NULL)
+ {
+ fprintf_unfiltered (gdb_stdout, "Already logging to %s.\n",
+ saved_filename);
+ return;
+ }
+
+ output = gdb_fopen (logging_filename, logging_overwrite ? "w" : "a");
+ if (output == NULL)
+ perror_with_name ("set logging");
+
+ /* Redirects everything to gdb_stdout while this is running. */
+ if (!logging_redirect)
+ {
+ output = tee_file_new (gdb_stdout, 0, output, 1);
+ if (output == NULL)
+ perror_with_name ("set logging");
+ if (from_tty)
+ fprintf_unfiltered (gdb_stdout, "Copying output to %s.\n",
+ logging_filename);
+ }
+ else if (from_tty)
+ fprintf_unfiltered (gdb_stdout, "Redirecting output to %s.\n",
+ logging_filename);
+
+ saved_filename = xstrdup (logging_filename);
+ saved_stdout = gdb_stdout;
+ saved_stderr = gdb_stderr;
+ saved_stdlog = gdb_stdlog;
+ saved_stdtarg = gdb_stdtarg;
+
+ gdb_stdout = output;
+ gdb_stderr = output;
+ gdb_stdlog = output;
+ gdb_stdtarg = output;
+
+ if (ui_out_redirect (uiout, gdb_stdout) < 0)
+ warning ("Current output protocol does not support redirection");
+}
+
+static void
+set_logging_help ()
+{
+ printf_unfiltered ("Usage: set logging on [FILENAME]\n");
+ printf_unfiltered (" set logging off\n");
+ printf_unfiltered (" set logging FILENAME\n");
+ printf_unfiltered (" set logging overwrite [on|off]\n");
+ printf_unfiltered (" set logging append [on|off]\n");
+}
+
+static void
+set_logging_command (char *args, int from_tty)
+{
+ char *first_word, *rest;
+
+ if (args == NULL)
+ {
+ set_logging_help ();
+ return;
+ }
+
+ /* Find the first word and the rest of the line. */
+ first_word = args;
+ rest = first_word;
+ while (*rest && !isspace (*rest))
+ rest++;
+ if (*rest)
+ {
+ *rest = '\0';
+ rest++;
+ while (*rest && isspace (*rest))
+ rest++;
+ }
+ if (*rest == '\0')
+ rest = NULL;
+
+ if (strcmp (first_word, "off") == 0)
+ {
+ if (rest)
+ {
+ set_logging_help ();
+ return;
+ }
+
+ if (saved_filename == NULL)
+ return;
+
+ pop_output_files ();
+ if (from_tty)
+ fprintf_unfiltered (gdb_stdout, "Done logging to %s.\n", saved_filename);
+ xfree (saved_filename);
+ saved_filename = NULL;
+ return;
+ }
+
+ if (strcmp (first_word, "on") == 0)
+ {
+ if (rest)
+ {
+ xfree (logging_filename);
+ logging_filename = xstrdup (rest);
+ }
+ if (!logging_filename)
+ logging_filename = xstrdup ("gdb.txt");
+
+ handle_redirections (from_tty);
+ return;
+ }
+
+ if (strcmp (first_word, "file") == 0)
+ {
+ if (rest == NULL)
+ {
+ set_logging_help ();
+ return;
+ }
+
+ if (logging_filename)
+ xfree (logging_filename);
+ logging_filename = xstrdup (rest);
+ return;
+ }
+
+ if (strcmp (first_word, "overwrite") == 0)
+ {
+ if (rest == NULL
+ || strcmp (rest, "1") == 0
+ || strcmp (rest, "true") == 0
+ || strcmp (rest, "on") == 0)
+ logging_overwrite = 1;
+ else if (strcmp (rest, "0") == 0
+ || strcmp (rest, "false") == 0
+ || strcmp (rest, "off") == 0)
+ logging_overwrite = 0;
+ else
+ set_logging_help ();
+ return;
+ }
+
+ if (strcmp (first_word, "redirect") == 0)
+ {
+ if (rest == NULL
+ || strcmp (rest, "1") == 0
+ || strcmp (rest, "true") == 0
+ || strcmp (rest, "on") == 0)
+ logging_redirect = 1;
+ else if (strcmp (rest, "0") == 0
+ || strcmp (rest, "false") == 0
+ || strcmp (rest, "off") == 0)
+ logging_redirect = 0;
+ else
+ set_logging_help ();
+ return;
+ }
+
+ set_logging_help ();
+ return;
+}
+
+void
+show_logging_command (char *args, int from_tty)
+{
+ if (saved_filename)
+ printf_unfiltered ("Currently logging to %s.\n", saved_filename);
+ if (logging_filename == NULL || saved_filename == NULL
+ || strcmp (logging_filename, saved_filename) != 0)
+ printf_unfiltered ("Future logs will be written to %s.\n",
+ logging_filename ? logging_filename : "gdb.txt");
+
+ if (logging_overwrite)
+ printf_unfiltered ("Logs will overwrite the log file.\n");
+ else
+ printf_unfiltered ("Logs will be appended to the log file.\n");
+
+ if (logging_redirect)
+ printf_unfiltered ("Output will be sent only to the log file.\n");
+ else
+ printf_unfiltered ("Output will be logged and displayed.\n");
+}
+\f
/* Functions to manipulate command line editing control variables. */
/* Number of commands to print in each call to show_commands. */
@@ -2080,6 +2298,11 @@ ie. the number of previous commands to k
Use \"on\" to enable the notification, and \"off\" to disable it.", &setlist),
&showlist);
}
+
+ add_cmd ("logging", no_class, set_logging_command,
+ "Set logging options", &setlist);
+ add_cmd ("logging", no_class, show_logging_command,
+ "Show logging options", &showlist);
}
void
Index: ui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.c,v
retrieving revision 1.27
diff -u -p -r1.27 ui-out.c
--- ui-out.c 8 Jun 2003 18:27:14 -0000 1.27
+++ ui-out.c 22 Jun 2003 20:47:09 -0000
@@ -206,6 +206,7 @@ struct ui_out_impl default_ui_out_impl =
default_message,
default_wrap_hint,
default_flush,
+ NULL,
0, /* Does not need MI hacks. */
};
@@ -254,6 +255,7 @@ static void uo_message (struct ui_out *u
const char *format, va_list args);
static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
static void uo_flush (struct ui_out *uiout);
+static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream);
/* Prototypes for local functions */
@@ -638,6 +640,12 @@ ui_out_flush (struct ui_out *uiout)
uo_flush (uiout);
}
+int
+ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream)
+{
+ return uo_redirect (uiout, outstream);
+}
+
/* set the flags specified by the mask given */
int
ui_out_set_flags (struct ui_out *uiout, int mask)
@@ -979,6 +987,15 @@ uo_flush (struct ui_out *uiout)
if (!uiout->impl->flush)
return;
uiout->impl->flush (uiout);
+}
+
+int
+uo_redirect (struct ui_out *uiout, struct ui_file *outstream)
+{
+ if (!uiout->impl->redirect)
+ return -1;
+ uiout->impl->redirect (uiout, outstream);
+ return 0;
}
/* local functions */
Index: ui-out.h
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.h,v
retrieving revision 1.17
diff -u -p -r1.17 ui-out.h
--- ui-out.h 3 Feb 2003 01:18:37 -0000 1.17
+++ ui-out.h 22 Jun 2003 20:47:09 -0000
@@ -231,6 +231,8 @@ typedef void (message_ftype) (struct ui_
const char *format, va_list args);
typedef void (wrap_hint_ftype) (struct ui_out * uiout, char *identstring);
typedef void (flush_ftype) (struct ui_out * uiout);
+typedef int (redirect_ftype) (struct ui_out * uiout,
+ struct ui_file * outstream);
/* ui-out-impl */
@@ -254,6 +256,7 @@ struct ui_out_impl
message_ftype *message;
wrap_hint_ftype *wrap_hint;
flush_ftype *flush;
+ redirect_ftype *redirect;
int is_mi_like_p;
};
@@ -265,5 +268,9 @@ extern struct ui_out_data *ui_out_data (
extern struct ui_out *ui_out_new (struct ui_out_impl *impl,
struct ui_out_data *data,
int flags);
+
+/* Redirect the ouptut of a ui_out object temporarily. */
+
+extern int ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream);
#endif /* UI_OUT_H */
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.166
diff -u -p -r1.166 gdb.texinfo
--- doc/gdb.texinfo 22 Jun 2003 04:27:24 -0000 1.166
+++ doc/gdb.texinfo 22 Jun 2003 20:47:13 -0000
@@ -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
@@ -1208,6 +1209,32 @@ You do not have to use the @code{shell}
@item make @var{make-args}
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
+
+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 [@var{file}]
+Enable logging. If @var{file} is specified, then the current logfile will be
+changed to @var{file}.
+@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
Index: mi/mi-out.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-out.c,v
retrieving revision 1.26
diff -u -p -r1.26 mi-out.c
--- mi/mi-out.c 8 Mar 2003 20:04:27 -0000 1.26
+++ mi/mi-out.c 22 Jun 2003 20:47:13 -0000
@@ -86,6 +86,7 @@ struct ui_out_impl mi_ui_out_impl =
mi_message,
mi_wrap_hint,
mi_flush,
+ NULL,
1, /* Needs MI hacks. */
};
Index: tui/tui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-out.c,v
retrieving revision 1.5
diff -u -p -r1.5 tui-out.c
--- tui/tui-out.c 13 Mar 2003 20:24:06 -0000 1.5
+++ tui/tui-out.c 22 Jun 2003 20:47:13 -0000
@@ -90,6 +90,7 @@ static struct ui_out_impl tui_ui_out_imp
tui_message,
tui_wrap_hint,
tui_flush,
+ NULL,
0, /* Does not need MI hacks (i.e. needs CLI hacks). */
};
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: RFC: "set logging" 2003-06-22 20:53 RFC: "set logging" Daniel Jacobowitz @ 2003-06-22 21:33 ` Andrew Cagney 2003-06-22 23:57 ` Doug Evans ` (2 subsequent siblings) 3 siblings, 0 replies; 10+ messages in thread From: Andrew Cagney @ 2003-06-22 21:33 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches > set logging on [FILE] > set logging off > set logging overwrite [I changed the default to append] This is boolean? As in add_setshow_boolean_cmd? BTW, the usage has "append". > set logging redirect same? > set logging file you mean: set logging file FILE > show logging Yea. For the code. > + add_cmd ("logging", no_class, set_logging_command, > + "Set logging options", &setlist); > + add_cmd ("logging", no_class, show_logging_command, > + "Show logging options", &showlist); See remote.c's 'set remote' for how to implement multi-level tab completion commands. > +static struct ui_file *saved_stdout; > +static struct ui_file *saved_stderr; > +static struct ui_file *saved_stdlog; > +static struct ui_file *saved_stdtarg; Suggest grouping these into a struct. My things to do one day is to also group the globals into a structure. > +static void > +set_logging_help () > +{ > + printf_unfiltered ("Usage: set logging on [FILENAME]\n"); > + printf_unfiltered (" set logging off\n"); > + printf_unfiltered (" set logging FILENAME\n"); this one is wrong > + printf_unfiltered (" set logging overwrite [on|off]\n"); > + printf_unfiltered (" set logging append [on|off]\n"); > +} I did't realise GDB had `Usage:' style messages so went looking. It has a few. It should include a brief overview of what the command is doing. > The above set commands, and also: > log file CMD > "log" will obey "set logging append" and "set logging redirect". yes both: log CMD and redirect CMD are both plausable. I think the CLI part deserves a new cli/cli-logging.[ch] file. Think about it for 6 later this week :-) Andrew ^ permalink raw reply [flat|nested] 10+ messages in thread
* RFC: "set logging" 2003-06-22 20:53 RFC: "set logging" Daniel Jacobowitz 2003-06-22 21:33 ` Andrew Cagney @ 2003-06-22 23:57 ` Doug Evans 2003-06-23 0:15 ` Daniel Jacobowitz 2003-06-23 4:51 ` Eli Zaretskii 2003-06-23 22:15 ` Daniel Jacobowitz 3 siblings, 1 reply; 10+ messages in thread From: Doug Evans @ 2003-06-22 23:57 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches Daniel Jacobowitz writes: > As discussed earlier: > set logging on [FILE] > set logging off > set logging overwrite [I changed the default to append] > set logging redirect > set logging file > show logging > > I decided that one-off command logging was really a different class of thing > from this patch, which is straight output logging, not really script-useful > redirection. So that's gone. For my own education, what's the difference? If one amends the definition of logging to include the tracing of commands, then I'd agree: they are different. Suppose you have a complex set of macros for driving a testsuite and you want to see who's calling what, etc.; or when something fails you want to know what was the last gdb command executed. And suppose typically these scripts are run in batch mode, on a server farm via cron jobs or some such. Tracing of gdb commands as they execute is very useful here. Not just the output of the commands but _the actual commands themselves_. I gather this patch isn't that though (or did I miss something?). If one separates this from command output redirection for the purposes of doing something further with the output (akin to pipes in shell-speak), then I'd agree they are different. Also, fwiw, by "one-off" I mean the ability of a macro (or maybe commands of a breakpoint/watchpoint) to temporarily change gdb state and then restore things once finished. > Is this OK? Any comments? Docs OK? Any opinions on whether the tracing of the commands themselves, in addition to their output, would be a useful addition to "set logging"? "logging" suggests to me logging for debug/informational purposes, as opposed to redirection for subsequent processing. Adding tracing of the commands themselves seems like a useful addition to me. [btw, the $`mumble` syntax in my previous message, in case it wasn't clear, is akin to $() in ksh/bash] > 2003-06-22 Daniel Jacobowitz <drow@mvista.com> > > * 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. > * top.c (handle_redirections, pop_output_files): New functions. > (set_logging_help, set_logging_command, show_logging_command): New > functions. > (init_main): Create "set logging" and "show logging" commands. > > 2003-06-22 Daniel Jacobowitz <drow@mvista.com> > > * mi-out.c (mi_ui_out_impl): Add NULL for redirect member. > > 2003-06-22 Daniel Jacobowitz <drow@mvista.com> > > * tui-out.c (tui_ui_out_impl): Add NULL for redirect member. > > 2003-06-22 Daniel Jacobowitz <drow@mvista.com> > > * gdb.texinfo (Logging output): New chapter. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RFC: "set logging" 2003-06-22 23:57 ` Doug Evans @ 2003-06-23 0:15 ` Daniel Jacobowitz 0 siblings, 0 replies; 10+ messages in thread From: Daniel Jacobowitz @ 2003-06-23 0:15 UTC (permalink / raw) To: Doug Evans; +Cc: gdb-patches On Sun, Jun 22, 2003 at 04:57:33PM -0700, Doug Evans wrote: > Daniel Jacobowitz writes: > > As discussed earlier: > > set logging on [FILE] > > set logging off > > set logging overwrite [I changed the default to append] > > set logging redirect > > set logging file > > show logging > > > > I decided that one-off command logging was really a different class of thing > > from this patch, which is straight output logging, not really script-useful > > redirection. So that's gone. > > For my own education, what's the difference? > > If one amends the definition of logging to include the > tracing of commands, then I'd agree: they are different. > Suppose you have a complex set of macros for driving a testsuite > and you want to see who's calling what, etc.; or when something > fails you want to know what was the last gdb command executed. > And suppose typically these scripts are run in batch mode, on a server > farm via cron jobs or some such. > Tracing of gdb commands as they execute is very useful here. > Not just the output of the commands but _the actual commands themselves_. > > I gather this patch isn't that though (or did I miss something?). That's what we called a "transcript" in the last conversation about this, something I deliberately did not implement. It's much more work to get right. > If one separates this from command output redirection for the purposes > of doing something further with the output (akin to pipes in shell-speak), > then I'd agree they are different. And this is what I was calling "script-useful redirection", i.e. formatted output. > Any opinions on whether the tracing of the commands > themselves, in addition to their output, would be a useful addition > to "set logging"? > "logging" suggests to me logging for debug/informational purposes, > as opposed to redirection for subsequent processing. > Adding tracing of the commands themselves seems like a useful addition > to me. Sure it is. I just don't have demand for it, so I didn't do it. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RFC: "set logging" 2003-06-22 20:53 RFC: "set logging" Daniel Jacobowitz 2003-06-22 21:33 ` Andrew Cagney 2003-06-22 23:57 ` Doug Evans @ 2003-06-23 4:51 ` Eli Zaretskii 2003-06-23 22:15 ` Daniel Jacobowitz 3 siblings, 0 replies; 10+ messages in thread From: Eli Zaretskii @ 2003-06-23 4:51 UTC (permalink / raw) To: drow; +Cc: gdb-patches > Date: Sun, 22 Jun 2003 16:53:22 -0400 > From: Daniel Jacobowitz <drow@mvista.com> > > Docs OK? Yes, but please add an appropriate @cindex entry right after the @section directive. Something like this: @cindex logging @value{GDBN} output Thanks. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RFC: "set logging" 2003-06-22 20:53 RFC: "set logging" Daniel Jacobowitz ` (2 preceding siblings ...) 2003-06-23 4:51 ` Eli Zaretskii @ 2003-06-23 22:15 ` Daniel Jacobowitz 2003-06-23 23:09 ` Andrew Cagney ` (2 more replies) 3 siblings, 3 replies; 10+ messages in thread From: Daniel Jacobowitz @ 2003-06-23 22:15 UTC (permalink / raw) To: gdb-patches On Sun, Jun 22, 2003 at 04:53:22PM -0400, Daniel Jacobowitz wrote: > As discussed earlier: > set logging on [FILE] > set logging off > set logging overwrite [I changed the default to append] > set logging redirect > set logging file > show logging > > I decided that one-off command logging was really a different class of thing > from this patch, which is straight output logging, not really script-useful > redirection. So that's gone. > > Is this OK? Any comments? Docs OK? Here's an update, based on feedback. Barring comments I'll commit it in a couple of days to mainline, and next week to the branch. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-06-23 Daniel Jacobowitz <drow@mvista.com> * 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". 2003-06-23 Daniel Jacobowitz <drow@mvista.com> * cli-logging.c: New file. 2003-06-23 Daniel Jacobowitz <drow@mvista.com> * mi-out.c (mi_ui_out_impl): Add NULL for redirect member. 2003-06-23 Daniel Jacobowitz <drow@mvista.com> * tui-out.c (tui_ui_out_impl): Add NULL for redirect member. 2003-06-23 Daniel Jacobowitz <drow@mvista.com> * gdb.texinfo (Logging output): New chapter. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.410 diff -u -p -r1.410 Makefile.in --- Makefile.in 21 Jun 2003 23:14:43 -0000 1.410 +++ Makefile.in 23 Jun 2003 21:41:42 -0000 @@ -146,10 +146,12 @@ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYST SUBDIR_CLI_OBS = \ cli-dump.o \ cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \ + cli-logging.o \ cli-interp.o SUBDIR_CLI_SRCS = \ cli/cli-dump.c \ cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \ + cli/cli-logging.c \ cli/cli-interp.c \ cli/cli-utils.c SUBDIR_CLI_DEPS = @@ -2410,7 +2412,7 @@ z8k-tdep.o: z8k-tdep.c $(defs_h) $(frame # gdb/cli/ dependencies # # Need to explicitly specify the compile rule as make will do nothing -# or try to compile the object file into the mi directory. +# or try to compile the object file into the cli directory. cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(completer_h) $(target_h) \ $(gdb_wait_h) $(gdb_regex_h) $(gdb_string_h) $(filenames_h) \ @@ -2429,6 +2431,8 @@ cli-dump.o: $(srcdir)/cli/cli-dump.c $(d cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \ $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c +cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(ui_out_h) $(gdbcmd_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \ $(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \ $(cli_script_h) Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.111 diff -u -p -r1.111 NEWS --- NEWS 23 Jun 2003 03:28:13 -0000 1.111 +++ NEWS 23 Jun 2003 21:41:43 -0000 @@ -6,6 +6,11 @@ *** Changes in GDB 6.0: +* GDB supports logging output to a file + +There are two new commands, "set logging" and "show logging", which can be +used to capture GDB's output to a file. + * The meaning of "detach" has changed for gdbserver The "detach" command will now resume the application, as documented. To Index: cli-out.c =================================================================== RCS file: /cvs/src/src/gdb/cli-out.c,v retrieving revision 1.16 diff -u -p -r1.16 cli-out.c --- cli-out.c 8 Mar 2003 20:04:27 -0000 1.16 +++ cli-out.c 23 Jun 2003 21:41:43 -0000 @@ -31,6 +31,7 @@ struct ui_out_data { struct ui_file *stream; + struct ui_file *original_stream; int suppress_output; }; typedef struct ui_out_data cli_out_data; @@ -64,6 +65,7 @@ static void cli_message (struct ui_out * const char *format, va_list args); static void cli_wrap_hint (struct ui_out *uiout, char *identstring); static void cli_flush (struct ui_out *uiout); +static int cli_redirect (struct ui_out *uiout, struct ui_file *outstream); /* This is the CLI ui-out implementation functions vector */ @@ -87,6 +89,7 @@ static struct ui_out_impl cli_ui_out_imp cli_message, cli_wrap_hint, cli_flush, + cli_redirect, 0, /* Does not need MI hacks (i.e. needs CLI hacks). */ }; @@ -324,6 +327,24 @@ cli_flush (struct ui_out *uiout) gdb_flush (data->stream); } +int +cli_redirect (struct ui_out *uiout, struct ui_file *outstream) +{ + struct ui_out_data *data = ui_out_data (uiout); + if (outstream != NULL) + { + data->original_stream = data->stream; + data->stream = outstream; + } + else if (data->original_stream != NULL) + { + data->stream = data->original_stream; + data->original_stream = NULL; + } + + return 0; +} + /* local functions */ /* Like cli_field_fmt, but takes a variable number of args @@ -362,6 +383,7 @@ cli_out_new (struct ui_file *stream) cli_out_data *data = XMALLOC (cli_out_data); data->stream = stream; + data->original_stream = NULL; data->suppress_output = 0; return ui_out_new (&cli_ui_out_impl, data, flags); } Index: ui-out.c =================================================================== RCS file: /cvs/src/src/gdb/ui-out.c,v retrieving revision 1.27 diff -u -p -r1.27 ui-out.c --- ui-out.c 8 Jun 2003 18:27:14 -0000 1.27 +++ ui-out.c 23 Jun 2003 21:41:43 -0000 @@ -206,6 +206,7 @@ struct ui_out_impl default_ui_out_impl = default_message, default_wrap_hint, default_flush, + NULL, 0, /* Does not need MI hacks. */ }; @@ -254,6 +255,7 @@ static void uo_message (struct ui_out *u const char *format, va_list args); static void uo_wrap_hint (struct ui_out *uiout, char *identstring); static void uo_flush (struct ui_out *uiout); +static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream); /* Prototypes for local functions */ @@ -638,6 +640,12 @@ ui_out_flush (struct ui_out *uiout) uo_flush (uiout); } +int +ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream) +{ + return uo_redirect (uiout, outstream); +} + /* set the flags specified by the mask given */ int ui_out_set_flags (struct ui_out *uiout, int mask) @@ -979,6 +987,15 @@ uo_flush (struct ui_out *uiout) if (!uiout->impl->flush) return; uiout->impl->flush (uiout); +} + +int +uo_redirect (struct ui_out *uiout, struct ui_file *outstream) +{ + if (!uiout->impl->redirect) + return -1; + uiout->impl->redirect (uiout, outstream); + return 0; } /* local functions */ Index: ui-out.h =================================================================== RCS file: /cvs/src/src/gdb/ui-out.h,v retrieving revision 1.17 diff -u -p -r1.17 ui-out.h --- ui-out.h 3 Feb 2003 01:18:37 -0000 1.17 +++ ui-out.h 23 Jun 2003 21:41:43 -0000 @@ -231,6 +231,8 @@ typedef void (message_ftype) (struct ui_ const char *format, va_list args); typedef void (wrap_hint_ftype) (struct ui_out * uiout, char *identstring); typedef void (flush_ftype) (struct ui_out * uiout); +typedef int (redirect_ftype) (struct ui_out * uiout, + struct ui_file * outstream); /* ui-out-impl */ @@ -254,6 +256,7 @@ struct ui_out_impl message_ftype *message; wrap_hint_ftype *wrap_hint; flush_ftype *flush; + redirect_ftype *redirect; int is_mi_like_p; }; @@ -265,5 +268,9 @@ extern struct ui_out_data *ui_out_data ( extern struct ui_out *ui_out_new (struct ui_out_impl *impl, struct ui_out_data *data, int flags); + +/* Redirect the ouptut of a ui_out object temporarily. */ + +extern int ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream); #endif /* UI_OUT_H */ Index: cli/cli-logging.c =================================================================== RCS file: cli/cli-logging.c diff -N cli/cli-logging.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cli/cli-logging.c 23 Jun 2003 21:41:43 -0000 @@ -0,0 +1,205 @@ +/* Command-line output logging for GDB, the GNU debugger. + + Copyright 2003 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "gdbcmd.h" +#include "ui-out.h" + +#include "gdb_string.h" + +/* These hold the pushed copies of the gdb output files. + If NULL then nothing has yet been pushed. */ +struct saved_output_files +{ + struct ui_file *out; + struct ui_file *err; + struct ui_file *log; + struct ui_file *targ; +}; +static struct saved_output_files saved_output; +static char *saved_filename; + +static char *logging_filename; +int logging_overwrite, logging_redirect; + +/* If we've pushed output files, close them and pop them. */ +static void +pop_output_files () +{ + /* Only delete one of the files -- they are all set to the same + value. */ + ui_file_delete (gdb_stdout); + gdb_stdout = saved_output.out; + gdb_stderr = saved_output.err; + gdb_stdlog = saved_output.log; + gdb_stdtarg = saved_output.targ; + saved_output.out = NULL; + saved_output.err = NULL; + saved_output.log = NULL; + saved_output.targ = NULL; + + ui_out_redirect (uiout, NULL); +} + +/* This is a helper for the `set logging' command. */ +static void +handle_redirections (int from_tty) +{ + struct ui_file *output; + + if (saved_filename != NULL) + { + fprintf_unfiltered (gdb_stdout, "Already logging to %s.\n", + saved_filename); + return; + } + + output = gdb_fopen (logging_filename, logging_overwrite ? "w" : "a"); + if (output == NULL) + perror_with_name ("set logging"); + + /* Redirects everything to gdb_stdout while this is running. */ + if (!logging_redirect) + { + output = tee_file_new (gdb_stdout, 0, output, 1); + if (output == NULL) + perror_with_name ("set logging"); + if (from_tty) + fprintf_unfiltered (gdb_stdout, "Copying output to %s.\n", + logging_filename); + } + else if (from_tty) + fprintf_unfiltered (gdb_stdout, "Redirecting output to %s.\n", + logging_filename); + + saved_filename = xstrdup (logging_filename); + saved_output.out = gdb_stdout; + saved_output.err = gdb_stderr; + saved_output.log = gdb_stdlog; + saved_output.targ = gdb_stdtarg; + + gdb_stdout = output; + gdb_stderr = output; + gdb_stdlog = output; + gdb_stdtarg = output; + + if (ui_out_redirect (uiout, gdb_stdout) < 0) + warning ("Current output protocol does not support redirection"); +} + +static void +set_logging_on (char *args, int from_tty) +{ + char *rest = args; + if (rest && *rest) + { + xfree (logging_filename); + logging_filename = xstrdup (rest); + } + handle_redirections (from_tty); +} + +static void +set_logging_off (char *args, int from_tty) +{ + if (saved_filename == NULL) + return; + + pop_output_files (); + if (from_tty) + fprintf_unfiltered (gdb_stdout, "Done logging to %s.\n", saved_filename); + xfree (saved_filename); + saved_filename = NULL; +} + +static void +set_logging_command (char *args, int from_tty) +{ + printf_unfiltered ("\"set logging\" lets you log output to a file.\n"); + printf_unfiltered ("Usage: set logging on [FILENAME]\n"); + printf_unfiltered (" set logging off\n"); + printf_unfiltered (" set logging file FILENAME\n"); + printf_unfiltered (" set logging overwrite [on|off]\n"); + printf_unfiltered (" set logging redirect [on|off]\n"); +} + +void +show_logging_command (char *args, int from_tty) +{ + if (saved_filename) + printf_unfiltered ("Currently logging to \"%s\".\n", saved_filename); + if (saved_filename == NULL + || strcmp (logging_filename, saved_filename) != 0) + printf_unfiltered ("Future logs will be written to %s.\n", + logging_filename); + + if (logging_overwrite) + printf_unfiltered ("Logs will overwrite the log file.\n"); + else + printf_unfiltered ("Logs will be appended to the log file.\n"); + + if (logging_redirect) + printf_unfiltered ("Output will be sent only to the log file.\n"); + else + printf_unfiltered ("Output will be logged and displayed.\n"); +} + +void +_initialize_cli_logging (void) +{ + static struct cmd_list_element *set_logging_cmdlist, *show_logging_cmdlist; + + + add_prefix_cmd ("logging", class_support, set_logging_command, + "Set logging options", &set_logging_cmdlist, + "set logging ", 0, &setlist); + add_prefix_cmd ("logging", class_support, show_logging_command, + "Show logging options", &show_logging_cmdlist, + "show logging ", 0, &showlist); + add_setshow_boolean_cmd ("overwrite", class_support, &logging_overwrite, + "Set whether logging overwrites or appends " + "to the log file.\n", + "Show whether logging overwrites or appends " + "to the log file.\n", + NULL, NULL, &set_logging_cmdlist, &show_logging_cmdlist); + add_setshow_boolean_cmd ("redirect", class_support, &logging_redirect, + "Set the logging output mode.\n" + "If redirect is off, output will go to both the " + "screen and the log file.\n" + "If redirect is on, output will go only to the log " + "file.", + "Show the logging output mode.\n" + "If redirect is off, output will go to both the " + "screen and the log file.\n" + "If redirect is on, output will go only to the log " + "file.", + NULL, NULL, &set_logging_cmdlist, &show_logging_cmdlist); + add_setshow_cmd ("file", class_support, var_filename, &logging_filename, + "Set the current logfile.", "Show the current logfile.", + NULL, NULL, &set_logging_cmdlist, &show_logging_cmdlist); + add_cmd ("on", class_support, set_logging_on, + "Enable logging.", &set_logging_cmdlist); + add_cmd ("off", class_support, set_logging_off, + "Disable logging.", &set_logging_cmdlist); + + logging_filename = xstrdup ("gdb.txt"); +} Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.167 diff -u -p -r1.167 gdb.texinfo --- doc/gdb.texinfo 23 Jun 2003 03:28:14 -0000 1.167 +++ doc/gdb.texinfo 23 Jun 2003 21:41:46 -0000 @@ -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 @@ -1208,6 +1209,32 @@ You do not have to use the @code{shell} @item make @var{make-args} 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 Index: mi/mi-out.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-out.c,v retrieving revision 1.26 diff -u -p -r1.26 mi-out.c --- mi/mi-out.c 8 Mar 2003 20:04:27 -0000 1.26 +++ mi/mi-out.c 23 Jun 2003 21:41:46 -0000 @@ -86,6 +86,7 @@ struct ui_out_impl mi_ui_out_impl = mi_message, mi_wrap_hint, mi_flush, + NULL, 1, /* Needs MI hacks. */ }; Index: tui/tui-out.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui-out.c,v retrieving revision 1.5 diff -u -p -r1.5 tui-out.c --- tui/tui-out.c 13 Mar 2003 20:24:06 -0000 1.5 +++ tui/tui-out.c 23 Jun 2003 21:41:47 -0000 @@ -90,6 +90,7 @@ static struct ui_out_impl tui_ui_out_imp tui_message, tui_wrap_hint, tui_flush, + NULL, 0, /* Does not need MI hacks (i.e. needs CLI hacks). */ }; ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RFC: "set logging" 2003-06-23 22:15 ` Daniel Jacobowitz @ 2003-06-23 23:09 ` Andrew Cagney 2003-06-24 4:10 ` Eli Zaretskii 2003-06-28 16:34 ` Daniel Jacobowitz 2 siblings, 0 replies; 10+ messages in thread From: Andrew Cagney @ 2003-06-23 23:09 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches +void +_initialize_cli_logging (void) +{ + static struct cmd_list_element *set_logging_cmdlist, *show_logging_cmdlist; + + + add_prefix_cmd ("logging", class_support, set_logging_command, + "Set logging options", &set_logging_cmdlist, + "set logging ", 0, &setlist); + add_prefix_cmd ("logging", class_support, show_logging_command, + "Show logging options", &show_logging_cmdlist, + "show logging ", 0, &showlist); + add_setshow_boolean_cmd ("overwrite", class_support, &logging_overwrite, + "Set whether logging overwrites or appends " Er, wow. It made it simplier. Nice. Andrew ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RFC: "set logging" 2003-06-23 22:15 ` Daniel Jacobowitz 2003-06-23 23:09 ` Andrew Cagney @ 2003-06-24 4:10 ` Eli Zaretskii 2003-06-28 16:34 ` Daniel Jacobowitz 2 siblings, 0 replies; 10+ messages in thread From: Eli Zaretskii @ 2003-06-24 4:10 UTC (permalink / raw) To: drow; +Cc: gdb-patches > Date: Mon, 23 Jun 2003 17:48:22 -0400 > From: Daniel Jacobowitz <drow@mvista.com> > > Here's an update, based on feedback. Barring comments I'll commit it > in a couple of days to mainline, and next week to the branch. The Texinfo part is fine with we. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RFC: "set logging" 2003-06-23 22:15 ` Daniel Jacobowitz 2003-06-23 23:09 ` Andrew Cagney 2003-06-24 4:10 ` Eli Zaretskii @ 2003-06-28 16:34 ` Daniel Jacobowitz 2003-07-02 20:53 ` Daniel Jacobowitz 2 siblings, 1 reply; 10+ messages in thread From: Daniel Jacobowitz @ 2003-06-28 16:34 UTC (permalink / raw) To: gdb-patches On Mon, Jun 23, 2003 at 05:48:22PM -0400, Daniel Jacobowitz wrote: > On Sun, Jun 22, 2003 at 04:53:22PM -0400, Daniel Jacobowitz wrote: > > As discussed earlier: > > set logging on [FILE] > > set logging off > > set logging overwrite [I changed the default to append] > > set logging redirect > > set logging file > > show logging > > > > I decided that one-off command logging was really a different class of thing > > from this patch, which is straight output logging, not really script-useful > > redirection. So that's gone. > > > > Is this OK? Any comments? Docs OK? > > Here's an update, based on feedback. Barring comments I'll commit it > in a couple of days to mainline, and next week to the branch. Feedback was positive, so it's in. I'll put it on the branch next week unless someone finds a problem. I'm flushing my 6.0 queue... I only have one more significant issue, but it will be a little while before I can get adequate test cases together. Still waiting for comments on the MI testsuite patch. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RFC: "set logging" 2003-06-28 16:34 ` Daniel Jacobowitz @ 2003-07-02 20:53 ` Daniel Jacobowitz 0 siblings, 0 replies; 10+ messages in thread From: Daniel Jacobowitz @ 2003-07-02 20:53 UTC (permalink / raw) To: gdb-patches On Sat, Jun 28, 2003 at 12:34:02PM -0400, Daniel Jacobowitz wrote: > On Mon, Jun 23, 2003 at 05:48:22PM -0400, Daniel Jacobowitz wrote: > > On Sun, Jun 22, 2003 at 04:53:22PM -0400, Daniel Jacobowitz wrote: > > > As discussed earlier: > > > set logging on [FILE] > > > set logging off > > > set logging overwrite [I changed the default to append] > > > set logging redirect > > > set logging file > > > show logging > > > > > > I decided that one-off command logging was really a different class of thing > > > from this patch, which is straight output logging, not really script-useful > > > redirection. So that's gone. > > > > > > Is this OK? Any comments? Docs OK? > > > > Here's an update, based on feedback. Barring comments I'll commit it > > in a couple of days to mainline, and next week to the branch. > > Feedback was positive, so it's in. I'll put it on the branch next week > unless someone finds a problem. Done; with this bit on HEAD to match reality. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-07-02 Daniel Jacobowitz <drow@mvista.com> * NEWS: Move "set logging" entry into GDB 6.0 section. Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.112 diff -u -p -r1.112 NEWS --- NEWS 28 Jun 2003 16:19:05 -0000 1.112 +++ NEWS 2 Jul 2003 20:48:45 -0000 @@ -3,12 +3,12 @@ *** Changes since GDB 6.0: +*** Changes in GDB 6.0: + * GDB supports logging output to a file There are two new commands, "set logging" and "show logging", which can be used to capture GDB's output to a file. - -*** Changes in GDB 6.0: * The meaning of "detach" has changed for gdbserver ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-07-02 20:53 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-06-22 20:53 RFC: "set logging" Daniel Jacobowitz 2003-06-22 21:33 ` Andrew Cagney 2003-06-22 23:57 ` Doug Evans 2003-06-23 0:15 ` Daniel Jacobowitz 2003-06-23 4:51 ` Eli Zaretskii 2003-06-23 22:15 ` Daniel Jacobowitz 2003-06-23 23:09 ` Andrew Cagney 2003-06-24 4:10 ` Eli Zaretskii 2003-06-28 16:34 ` Daniel Jacobowitz 2003-07-02 20:53 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox