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 Fri, Apr 9, 2010 at 10:46 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Fri, 9 Apr 2010 10:23:17 -0700
>> From: Doug Evans <dje@google.com>
>> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>>
>> 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}.
>
> This is fine, but what if @var{filename} is @file{d:/foo/myscript} (on
> Windows)?

source.c:openp() doesn't handle that case, it just blindly concatenates.
[presumably because it hasn't needed to]

I don't have an opinion on what *should* happen here.
Possibilities are to either not try or remove the drive spec.


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