This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

trouble locating source files through relative paths


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]