From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12389 invoked by alias); 31 Aug 2010 13:08:58 -0000 Received: (qmail 12260 invoked by uid 22791); 31 Aug 2010 13:08:56 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 13:08:52 +0000 Received: (qmail 22444 invoked from network); 31 Aug 2010 13:08:50 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 31 Aug 2010 13:08:50 -0000 Date: Tue, 31 Aug 2010 13:08:00 -0000 From: Daniel Jacobowitz To: Srinath Avadhanula Cc: gdb@sourceware.org Subject: Re: A question about data-directory Message-ID: <20100831130845.GA17941@caradoc.them.org> Mail-Followup-To: Srinath Avadhanula , gdb@sourceware.org References: <20100830230035.GA5311@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00172.txt.bz2 On Mon, Aug 30, 2010 at 07:21:59PM -0400, Srinath Avadhanula wrote: > Hi Daniel, > > On Mon, Aug 30, 2010 at 7:00 PM, Daniel Jacobowitz wrote: > > On Mon, Aug 30, 2010 at 06:46:49PM -0400, Srinath Avadhanula wrote: > >> I was expecting the output from the auto-load script to say 'getting > >> here' before getting back to the prompt. If I place test-gdb.py in the > >> same directory as the executable (i.e. at /tmp/test/test-gdb.py) then > >> I do get a line saying 'getting here'. > > > > IIUC, that's what's supposed to happen right now.  The 'python' > > directory in datadir is added to the Python search path, but gdb.py > > files are searched for next to the object file. > > > > That seems to flatly contradict what is mentioned in the doc: > > ----------%<------------ > Finally, if this file does not exist, then gdb will look for a file > named data-directory/python/auto-load/real-name, where data-directory > is gdb's data directory (available via show data-directory, see Data > Files), and real-name is the object file's real name, as described > above. > ----------%<------------ I think this is a different search option - and you're misreading REAL-NAME. The real name is going to be $DATADIR/tmp/test/test. Also, the docs appear to be wrong, by stracing GDB: open("../gdb", O_RDONLY) = 7 open("/space/fsf/x86-64/commit-gdb/gdb/gdb-gdb.py", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/debug/space/fsf/x86-64/commit-gdb/gdb/gdb-gdb.py", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/share/gdb/auto-load/space/fsf/x86-64/commit-gdb/gdb/gdb-gdb.py", O_RDONLY) = -1 ENOENT (No such file or directory) -- Daniel Jacobowitz CodeSourcery