This is the mail archive of the gdb@sources.redhat.com 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]

Finding absolute path from relative.


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


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