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]

Re: [MI] -file-list-exec-source-files


On Tue, Feb 17, 2004 at 02:12:38PM -0500, Daniel Jacobowitz wrote:
> On Tue, Feb 17, 2004 at 02:10:05PM -0500, Bob Rossi wrote:
> > I have one last question that didn't get answered, could the psymtab be
> > modified to contain the dirname?
> 
> Probably, but the dirname -> fullname conversion may be expensive - it
> involves a lot of stat() calls.

I could definatly use some advice getting the dirname into the psymtab.
I don't mind spending time implementing it if I could get a little
pointer in the right direction. It seems I would have to change both the
stabs reader and the dwarf2 reader. Is that correct?

I don't think the dirname->fullname conversion is bad at all. Well, at
least relative to looking up the fullname without the dirname.

Either, you lookup the fullname without the dirname, by using openp,
which has say N lookup attempts ( N-1 dir search path entries + 1
entry for the cwd ) 
   or
you lookup the fullname with dirname, by using open_source_file, which
add's 1 to that value of N ( by putting dirname in front ), and then
calls openp.

So, I think looking up the fullname with or without knowing the dirname
yeilds the same magnitude of work. However, if openp is implemented poorly, 
I could also look into that.

Bob Rossi


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