This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] new substitute path when loading feature
- From: Daniel Jacobowitz <drow at false dot org>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 13 May 2008 15:08:18 -0400
- Subject: Re: [RFC] new substitute path when loading feature
- References: <20080513181131.GA9899@caradoc.them.org> <4829E42D.4050105@qnx.com>
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.
> 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.
--
Daniel Jacobowitz
CodeSourcery