From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29973 invoked by alias); 9 Apr 2010 19:49:42 -0000 Received: (qmail 29962 invoked by uid 22791); 9 Apr 2010 19:49:41 -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) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Apr 2010 19:49:37 +0000 Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [10.3.21.5]) by smtp-out.google.com with ESMTP id o39JnYvP020697 for ; Fri, 9 Apr 2010 21:49:34 +0200 Received: from pwi9 (pwi9.prod.google.com [10.241.219.9]) by hpaq5.eem.corp.google.com with ESMTP id o39JnWuR028468 for ; Fri, 9 Apr 2010 21:49:33 +0200 Received: by pwi9 with SMTP id 9so3094465pwi.27 for ; Fri, 09 Apr 2010 12:49:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.247.17 with HTTP; Fri, 9 Apr 2010 12:49:32 -0700 (PDT) In-Reply-To: <83iq80zali.fsf@gnu.org> References: <20100406215751.7EC1784397@ruffy.mtv.corp.google.com> <8339z512xz.fsf@gnu.org> <83mxxczfha.fsf@gnu.org> <83iq80zali.fsf@gnu.org> Date: Fri, 09 Apr 2010 19:49:00 -0000 Received: by 10.141.88.12 with SMTP id q12mr945542rvl.188.1270842572194; Fri, 09 Apr 2010 12:49:32 -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/msg00279.txt.bz2 On Fri, Apr 9, 2010 at 12:31 PM, Eli Zaretskii wrote: >> Date: Fri, 9 Apr 2010 11:12:27 -0700 >> From: Doug Evans >> Cc: tromey@redhat.com, gdb-patches@sourceware.org >> >> > 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. > > My vote is for removing the drive letter. =A0The other alternative means > that absolute file names are handled inconsistently across platforms > (I assume that not trying to look for absolute file name on Posix > platforms will not be a useful behavior). > I can make a case for either choice on Posix platforms: ie. whether to search or to not search. I don't know which is better, but openp() already does the search for absolute path names (if OPF_SEARCH_IN_PATH is specified), so I lean towards not introducing something new. Does anyone know if there's existing code to strip a drive letter if presen= t? [It's trivial to do - but I fear the discussion involved in getting a patch in that does it The Right Way.]