Re: [RFC] new substitute path when loading feature

Daniel Jacobowitz
2008-05-13T19:08:53Z

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