handling of absolute source file paths (feature wish/implementation idea)

Andrew Cagney cagney@gnu.org
Thu Jan 22 18:45:00 GMT 2004


> Gernot Hillier <gernot.hillier@siemens.com>
>> Date: Thu, 22 Jan 2004 16:01:14 +0100
>> 
>> 3. Implement a new setting "source-absolute-prefix" (analog to the already 
>> existing "solib-absolute-prefix") which allows the user to set a prefix for 
>> given absolute source code paths.
> 
> 
> I like this suggestion the best.  It does exactly what you need here:
> allow the source directory tree to be moved deeper in the hierarchy.
> Your other suggestion, searching the source path for relative file
> names, sounds like an ad-hoc hack to me.

Hmm, we're rapidly accumulating a long list of ways to alter the 
absolute-prefix. cf also:

(gdb) help set debug-file-directory
Set the directory where separate debug symbols are searched for.
Separate debug symbols are first searched for in the same
directory as the binary, then in the `.debug' subdirectory,
and lastly at the path of the directory of the binary with
the global debug-file directory prepended

and the ./configure option:

   --with-sysroot[=DIR] Search for usr/lib et al within DIR.

Might be time for some consolidation:

set absolute-prefix {source,solib,sysroot,debug,all} <path>

(although an immediate source-absolute-prefix shouldn't hurt).

BTW, wasn't there a mechanism for editing/replacing part of the source 
prefix added, or did that get lost?

Andrew




More information about the Gdb mailing list