This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Add -s option to source command.


On Thursday 08 April 2010 19:49:41, Doug Evans wrote:
> On Wed, Apr 7, 2010 at 1:14 PM, Tom Tromey <tromey@redhat.com> wrote:
> > I often wish that gdb help strings were formatted more like --help
> > output.
> > 
> > Tom
> 
> Something like this?
> 
> @@ -1379,8 +1437,12 @@ Commands defined in this way may have up
> 
>    source_help_text = xstrprintf (_("\
>  Read commands from a file named FILE.\n\
> -Optional -v switch (before the filename) causes each command in\n\
> -FILE to be echoed as it is executed.\n\
> +\n\
> +Usage: source [-s] [-v] FILE\n\
> +-s: search for the script in the source search path,\n\
> +    even if FILE contains directories.\n\
> +-v: each command in FILE is echoed as it is executed.\n\
> +\n\
>  Note that the file \"%s\" is read automatically in this way\n\
>  when GDB is started."), gdbinit);
>    c = add_cmd ("source", class_support, source_command,

I totally agree with Tom here, but I don't know if it's a good thing to change 
the "standard" only in this feature without converting the other GDB help 
strings as well.  IMHO if we are going to start formatting the help strings 
like `--help' output, then we should do it for the majority (if not all) of 
the strings.

Anyway, my half cent here.

-- 
Sergio Durigan Junior
Debugger Engineer
Red Hat Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]