From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28716 invoked by alias); 19 Aug 2005 07:25:24 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28555 invoked by uid 22791); 19 Aug 2005 07:24:58 -0000 Received: from chfw.preston.net (HELO universe.preston.net) (202.14.89.130) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 19 Aug 2005 07:24:58 +0000 Received: from norman (norman.preston.net [202.14.10.82]) by universe.preston.net (8.11.6/8.11.6) with ESMTP id j7J7OqR16194 for ; Fri, 19 Aug 2005 17:24:52 +1000 Subject: trouble locating source files through relative paths From: Craig Jeffree To: gdb@sources.redhat.com Content-Type: text/plain Date: Fri, 19 Aug 2005 07:25:00 -0000 Message-Id: <1124436292.3582.64.camel@norman> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-08/txt/msg00066.txt.bz2 Hi, I've been having trouble getting GDB (v6.3 build myself from source on RHEL4) to locate the source files associated with the binary I'm debugging. The binary refers to some source files using relative paths say for example: ../../include/General/GeString.H This file exists but the path from which the relative path should start differs now because the binary has been moved. I've added the correct starting path to my source search path using the 'dir' command and expect GDB to find the file now as described in the GDB manual here: http://sources.redhat.com/gdb/download/onlinedocs/gdb_8.html#SEC53 However an strace of GDB shows that it only looks for GeString.H in the newly specified search path directory and doesn't ever try using the search path as a base for the relative directories. If I ignore the relative path and set the search path to the full path to this file it works, however the application has hundreds of files, some of which have conflicting names if the directory path isn't included. How can I get GDB to use the search path as a base for relative paths specified in the debug info rather than only looking directly in the search path dirs? Cheers, Craig.