Finding absolute path from relative.

Bob Rossi bob@brasko.net
Mon Sep 29 02:25:00 GMT 2003


Hi,

I am thinking about the algorithm required to find the absolute path to
a source file given the relative path and the output from 'show dir'.

Is it really as easy as this,

for I in 'show dir' # for each directory in show dir
   if $I/relative_path exists 
      break; # Found absolute path.

Or does it get more complex and obfuscated?

Bob Rossi



More information about the Gdb mailing list