Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: "set logging"
Date: Sun, 22 Jun 2003 21:33:00 -0000	[thread overview]
Message-ID: <3EF61F6A.4050007@redhat.com> (raw)
In-Reply-To: <20030622205322.GA14138@nevyn.them.org>

>   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






  reply	other threads:[~2003-06-22 21:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-22 20:53 Daniel Jacobowitz
2003-06-22 21:33 ` Andrew Cagney [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EF61F6A.4050007@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox