From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8920 invoked by alias); 13 May 2008 19:11:44 -0000 Received: (qmail 8911 invoked by uid 22791); 13 May 2008 19:11:43 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 13 May 2008 19:11:25 +0000 Received: from [10.42.100.129] (min.ott.qnx.com [10.42.100.129]) by nimbus.ott.qnx.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id K6WTMPZ9; Tue, 13 May 2008 15:11:22 -0400 Message-ID: <4829E7DA.3010606@qnx.com> Date: Tue, 13 May 2008 21:18:00 -0000 From: Aleksandar Ristovski User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com Subject: Re: [RFC] new substitute path when loading feature References: <20080513190818.GA13776@caradoc.them.org> In-Reply-To: <20080513190818.GA13776@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2008-05/txt/msg00410.txt.bz2 Daniel Jacobowitz wrote: > On Tue, May 13, 2008 at 02:55:41PM -0400, Aleksandar Ristovski wrote: >> Now without my change, this will sometimes work, sometimes it won't. For example, if the program was compiled on windows like this: >> >> C:\Temp\dirs\debug>gcc -g -O0 -c ../main.c -o main.o >> >> things would work. However if built like this: >> >> C:\Temp\dirs\debug>gcc -g -O0 -c c:\Temp\dirs\main.c -o main.o >> >> things would not work (as shown above). > > Is this just because of the slashes? I have a patch which makes > Unix-configured GDB more tolerant of DOS paths and drive names. I > can post it if you like; I've been meaning to. No, this particular issue is not because of the slashes, but rather due to IS_ABSOLUTE_PATH returning false on a path like "c:/Temp...". > >> In any case, it seems right to be able to rewrite paths at readin and let >> gdb "see" the binaries as if they were built locally. > > This means you have to have the source path mapping worked out before > you know what files are in the program, so it's hard to fix up later > if you see a new unrelocated path. > True and I was thinking further along these lines to enable rewriting existing paths in psymtabs/symtabs on demand (i.e. a command that would tell gdb: look through all psymtabs/symtabs and rewrite paths)... but wanted to get a feedback first :-)