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.


> Date: Thu, 8 Apr 2010 15:49:41 -0700
> From: Doug Evans <dje@google.com>
> Cc: gdb-patches@sourceware.org
> 
> 
> --- NEWS	1 Apr 2010 14:11:22 -0000	1.367
> +++ NEWS	8 Apr 2010 22:40:59 -0000
> @@ -3,6 +3,10 @@
>  
>  *** Changes since GDB 7.1
>  
> +* The source command now accepts a -s option to force searching for the
> +  script in the source search path even if the script name specifies
> +  a directory.
> +

This part is okay.

> --- doc/gdb.texinfo	8 Apr 2010 21:08:40 -0000	1.697
> +++ doc/gdb.texinfo	8 Apr 2010 22:41:00 -0000

This part is okay, with a couple of comments:

> @@ -19373,7 +19373,7 @@ using the @code{script-extension} settin
>  @table @code
>  @kindex source
>  @cindex execute commands from a file
> -@item source [@code{-v}] @var{filename}
> +@item source [@code{-s}] [@code{-v}] @var{filename}

Please remove the @code markup from the switches, it is redundant
(because this is "@table @code" already, so every @item gets the @code
markup by default).  Yes, the old text was also wrong.

> +If @code{-s} is specified, then @value{GDBN} searches for @var{filename}
> +on the search path even if @var{filename} specifies a directory.

I presume it searches for the basename of @var{filename}, right?  If
so, please tell that explicitly.  Also, the comments in the
implementation say that symlinks are not resolved; if that's how we
want this to work, it should also be mentioned, I think.

Thanks.


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