From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17878 invoked by alias); 9 Apr 2010 18:12:40 -0000 Received: (qmail 17870 invoked by uid 22791); 9 Apr 2010 18:12:39 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SARE_MSGID_LONG45,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Apr 2010 18:12:31 +0000 Received: from kpbe19.cbf.corp.google.com (kpbe19.cbf.corp.google.com [172.25.105.83]) by smtp-out.google.com with ESMTP id o39ICTHb025298 for ; Fri, 9 Apr 2010 11:12:29 -0700 Received: from pzk29 (pzk29.prod.google.com [10.243.19.157]) by kpbe19.cbf.corp.google.com with ESMTP id o39ICSr1032325 for ; Fri, 9 Apr 2010 11:12:28 -0700 Received: by pzk29 with SMTP id 29so3091192pzk.29 for ; Fri, 09 Apr 2010 11:12:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.247.17 with HTTP; Fri, 9 Apr 2010 11:12:27 -0700 (PDT) In-Reply-To: <83mxxczfha.fsf@gnu.org> References: <20100406215751.7EC1784397@ruffy.mtv.corp.google.com> <8339z512xz.fsf@gnu.org> <83mxxczfha.fsf@gnu.org> Date: Fri, 09 Apr 2010 18:12:00 -0000 Received: by 10.141.108.17 with SMTP id k17mr770910rvm.38.1270836747529; Fri, 09 Apr 2010 11:12:27 -0700 (PDT) Message-ID: Subject: Re: [RFA] Add -s option to source command. From: Doug Evans To: Eli Zaretskii Cc: tromey@redhat.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00271.txt.bz2 On Fri, Apr 9, 2010 at 10:46 AM, Eli Zaretskii wrote: >> Date: Fri, 9 Apr 2010 10:23:17 -0700 >> From: Doug Evans >> 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. =A0So, for example, if @var{filename} is @file{mylib/myscri= pt} >> 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.