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

Jim Ingham jingham@apple.com
Fri Jan 23 21:31:00 GMT 2004


Klee did something similar a while back.

He added a "set pathname-substitutions" command that took a list of 
pairs of path components - a "from" and a "to" element.  As it went 
looking for source files, if it saw the "from" element of any pair in 
the full path name, it would replace it with the "to" element of that 
pair, and try to open that.  This command currently only edits from the 
start of the path.  So you could do source-absolute-prefix by giving 
"/" as the from, and "/tmp/whatever" as the to.  In our case, we more 
often had
"/SourceMount/Projects/ProjectName" as the from, and 
~releng/ReleaseName/ReleaseVersion/Projects/ProjectName as the "to".

The source changes are not that big, since we just did a straight 
substitution, not any kind of regsub thingie...

Some people use this, though locally I think more folks just make links 
on their local machine to make up a source tree that looks like what 
the build & integration folks use on their builder machines.

Jim


On Jan 23, 2004, at 11:06 AM, gdb-digest-help@sources.redhat.com wrote:

>> (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?
>
> Now that sounds like a great idea.  I can't see it in the source,
> though, and it doesn't ring a bell.
>
>
--
Jim Ingham                                   jingham@apple.com
Developer Tools
Apple Computer



More information about the Gdb mailing list