From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2652 invoked by alias); 25 Nov 2005 18:17:41 -0000 Received: (qmail 2645 invoked by uid 22791); 25 Nov 2005 18:17:41 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 25 Nov 2005 18:17:39 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Efi8d-0001Dt-Le; Fri, 25 Nov 2005 13:17:35 -0500 Date: Fri, 25 Nov 2005 18:39:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Use search path for scripts Message-ID: <20051125181735.GF736@nevyn.them.org> Mail-Followup-To: Andrew STUBBS , Eli Zaretskii , gdb-patches@sources.redhat.com References: <437B6718.7070300@st.com> <437C6D69.1030209@st.com> <437DC94B.7060601@st.com> <437DE8F9.9030606@st.com> <20051125175735.GB736@nevyn.them.org> <438752FE.9070302@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <438752FE.9070302@st.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00464.txt.bz2 On Fri, Nov 25, 2005 at 06:07:58PM +0000, Andrew STUBBS wrote: > Daniel Jacobowitz wrote: > >Could you explain why you used the source path to search for scripts, > >instead of a separate search path? Was it just because it was handy? > >Are scripts likely to be in manually-added directories on the source > >search path? > > > >I don't see the correspondence. > > Because it was handy, but who says it is the 'source search path'? It's > just that that's all it's been used for up till now. ... what? It's the source search path because that's what it's used for. It's also documented that way: `-directory DIRECTORY' `-d DIRECTORY' Add DIRECTORY to the path to search for source files. and 7.4 Specifying source directories ================================= > The source directory is as likely a place as any for script files > (perhaps with some commands to help visualise the data). As it happens > we *always* add a directory (via -d in a wrapper) which contains nothing > but scripts, but since there are no sources that causes no problems. > > Conversely, there's no technical reason why they couldn't have different > search paths. However, having more may lead to confusion, command/option > bloat, and the possibility that the user will have to add the same path > twice - once to each path. > > If you wish I can split it out into a new list, with new commands, new > command-line options and new documentation. It solves the same problems > in the end. Most users don't ever have to add a source path. If you're using a modern compiler, and debugging something built locally, and not using certain kinds of include path constructs (which is unambiguously an open, and recently discussed, bug in GDB) then GDB will Just Find Things. I don't find it intuitive that the same path should be overloaded this way, and it makes changing the source searching algorithm even more complicated. However, I'd like to know if any other GDB maintainers have an opinion on this before I ask you to modify the patch. -- Daniel Jacobowitz CodeSourcery, LLC