diff options
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 17 |
2 files changed, 20 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 5a01076..ce9092f 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2010-04-15 Doug Evans <dje@google.com> + + * gdb.texinfo (Command Files): Add docs for new "source -s" option. + 2010-04-14 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Pretty Printing): Document behaviour when to_string diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 104a1ec..749e975 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -19373,7 +19373,7 @@ using the @code{script-extension} setting. @table @code @kindex source @cindex execute commands from a file -@item source [@code{-v}] @var{filename} +@item source [-s] [-v] @var{filename} Execute the command file @var{filename}. @end table @@ -19390,6 +19390,21 @@ directory, then @value{GDBN} also looks for the file on the source search path except that @file{$cdir} is not searched because the compilation directory is not relevant to scripts. +If @code{-s} is specified, then @value{GDBN} searches for @var{filename} +on the search path even if @var{filename} specifies a directory. +The search is done by appending @var{filename} to each element of the +search path. So, for example, if @var{filename} is @file{mylib/myscript} +and the search path contains @file{/home/user} then @value{GDBN} will +look for the script @file{/home/user/mylib/myscript}. +The search is also done if @var{filename} is an absolute path. +For example, if @var{filename} is @file{/tmp/myscript} and +the search path contains @file{/home/user} then @value{GDBN} will +look for the script @file{/home/user/tmp/myscript}. +For DOS-like systems, if @var{filename} contains a drive specification, +it is stripped before concatenation. For example, if @var{filename} is +@file{d:myscript} and the search path contains @file{c:/tmp} then @value{GDBN} +will look for the script @file{c:/tmp/myscript}. + If @code{-v}, for verbose mode, is given then @value{GDBN} displays each command as it is executed. The option must be given before @var{filename}, and is interpreted as part of the filename anywhere else. |