From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10576 invoked by alias); 20 Apr 2009 21:10:54 -0000 Received: (qmail 10487 invoked by uid 22791); 20 Apr 2009 21:10:53 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_37,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout6.012.net.il (HELO mtaout6.012.net.il) (84.95.2.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Apr 2009 21:10:46 +0000 Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0KIF0050044Y2C00@i-mtaout6.012.net.il> for gdb-patches@sourceware.org; Tue, 21 Apr 2009 00:10:41 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.219.161]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KIF00JXL45PGJ60@i-mtaout6.012.net.il>; Tue, 21 Apr 2009 00:10:38 +0300 (IDT) Date: Mon, 20 Apr 2009 21:10:00 -0000 From: Eli Zaretskii Subject: Re: Add --with-relocated-sources configure option In-reply-to: To: "Joseph S. Myers" Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83tz4jghf0.fsf@gnu.org> References: 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: 2009-04/txt/msg00542.txt.bz2 > Date: Mon, 20 Apr 2009 20:26:08 +0000 (UTC) > From: "Joseph S. Myers" > > gdb/doc: > 2009-04-20 Joseph Myers > > * gdb.texinfo (Source Path): Document --with-relocated-sources. This part is okay (assuming that the code is approved), with a few comments: > +@cindex @samp{--with-relocated-sources} > +You can configure a default source path substitution rule by > +configuring @value{GDBN} with the This needs an additional index entry which does not require to remember the name of the option by heart. Something like @cindex default source path substitution > +@samp{--with-relocated-sources=@var{path}} option. The @var{path} > +should be the name of a directory under @value{GDBN}'s configured > +binary prefix (set with @samp{--prefix} or @samp{--exec-prefix}), and > +paths in debug information under @var{path} will be relocated > +automatically if the installed @value{GDBN} is moved to a new > +location. First, GNU coding standards frown on using ``path'' for file names or directory names (see the node "GNU Manuals" in standards.texi). Second, the second part of the last sentence above, the one which starts with "and paths", got me confused. Let's see if I understood your intent. Assuming I configured GDB like this: ./configure --prefix=/some/dir --with-relocated-sources=/some/dir/bar then, even if the GDB tree is moved to /elsewhere/foo, GDB will automagically find its sources in /elsewhere/foo/bar. Is that true? If it's true, then I suggest (1) to drop the word "binary" in "binary prefix", and (2) rephrase the "will be relocated automatically" part, because nothing is actually relocated; rather, GDB substitutes the new path for the old without any explicit command from the user. The text as written suggests that files are somehow moved (``relocated'') somewhere. > This is useful if @value{GDBN}, libraries or executables > +with debug information and corresponding source code are being > +distributed together. Don't you mean that this is useful if they are also _moved_ to a different location together? Thanks.