From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13949 invoked by alias); 9 Apr 2010 17:23:38 -0000 Received: (qmail 13930 invoked by uid 22791); 9 Apr 2010 17:23:35 -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 17:23:32 +0000 Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id o39HNOn0012424 for ; Fri, 9 Apr 2010 10:23:24 -0700 Received: from pwj1 (pwj1.prod.google.com [10.241.219.65]) by kpbe12.cbf.corp.google.com with ESMTP id o39HMxrg017265 for ; Fri, 9 Apr 2010 10:23:22 -0700 Received: by pwj1 with SMTP id 1so3139701pwj.23 for ; Fri, 09 Apr 2010 10:23:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.247.17 with HTTP; Fri, 9 Apr 2010 10:23:17 -0700 (PDT) In-Reply-To: <8339z512xz.fsf@gnu.org> References: <20100406215751.7EC1784397@ruffy.mtv.corp.google.com> <8339z512xz.fsf@gnu.org> Date: Fri, 09 Apr 2010 17:23:00 -0000 Received: by 10.141.13.5 with SMTP id q5mr592881rvi.280.1270833798043; Fri, 09 Apr 2010 10:23:18 -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/msg00267.txt.bz2 On Fri, Apr 9, 2010 at 12:48 AM, Eli Zaretskii wrote: >> Date: Thu, 8 Apr 2010 15:49:41 -0700 >> From: Doug Evans >> Cc: gdb-patches@sourceware.org >> >> >> --- NEWS =A0 =A0 =A01 Apr 2010 14:11:22 -0000 =A0 =A0 =A0 1.367 >> +++ NEWS =A0 =A0 =A08 Apr 2010 22:40:59 -0000 >> @@ -3,6 +3,10 @@ >> >> =A0*** Changes since GDB 7.1 >> >> +* The source command now accepts a -s option to force searching for the >> + =A0script in the source search path even if the script name specifies >> + =A0a directory. >> + > > This part is okay. > >> --- doc/gdb.texinfo =A0 8 Apr 2010 21:08:40 -0000 =A0 =A0 =A0 1.697 >> +++ doc/gdb.texinfo =A0 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 >> =A0@table @code >> =A0@kindex source >> =A0@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). =A0Yes, the old text was also wrong. Righto. >> +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? =A0If > so, please tell that explicitly. The search includes the full path that the user provided. How's this text? 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}. > 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. The symlink comment is an implementation detail, it doesn't affect how source -s behaves.