RFC: Syntax for logging

Daniel Jacobowitz drow@mvista.com
Sun Jun 22 18:41:00 GMT 2003


On Sun, Jun 22, 2003 at 02:32:41PM -0400, Andrew Cagney wrote:
> >
> >Hmm, two options:
> >  set logging
> 
> Not this.  It should behave like:
> 
> (gdb) set architecture
> "set architecture" must be followed by "auto" or an architecture name.

OK.

> 
> >  unset logging
> >
> >I like "unset logging"; how about you?  The only thing we use unset for
> >at the moment is "unset environment" but I think it extends naturally.
> 
> so (slightly wierd) yes this.  Be sure to mention it in the help 
> message.  Perhaphs, also accept ``set logging off'', and ``set logging 
> on'' as those are the first things I'd try :-)
> 
> Hmm, just noticed, the options are optional, I was thinking that they 
> were required.
> 
> 	set logging [redirect|log] [append|overwrite] FILE
> 
> The syntax will lead to confusion with things like:
> 
> 	set logging l
> or
> 	set logging redirect a

Ugh, I'd forgotten about the abbreviations.

> suggest instead:
> 
> set logging on [FILE]
> 	default gdb.log, log, append?
> set logging off
> set logging file FILE
> set logging append {true,false}
> set logging redirect {true,false}
> 
> so that the [FILE] isn't context dependent.  Realisticly, I think people 
> will only use:
> 
> 	set logging on
> 	set logging off

That looks good.  I'll just ditch the unset idea.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb-patches mailing list