This is the mail archive of the gdb@sourceware.org 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: substitute-path problem


> I suspect compiling the file with a full path on the gcc command line
> would reproduce this.  Do you think we're applying the substitution
> rule in the wrong place?

I can indeed reproduce. I think that we are just missing one case.
First we try the fullpath if we already know it. Then the dirname
if we have it. But if there is no dirname, then we should try the
filename. Chances are, if the dirname is not specified, the file path
is embedded in the filename.

I will test the attach patch and commit if all is fine. In the meantim,
that might help you out in your work.

(I have wondered many times how much easier it would be for us if
we resolved the filename+dirname into a fullpath name at debug info
reading time, and then only stored that in our data structures - not
sure if it is posssible, but if it is, we would be able to assume in
the rest of the code that symbol->filename is always a fullpath, or
the closest to it we can do based on the information the compiler provided.
But I think that would change the behavior of certain things like source
file search with the dir path. I'm not completely sure yet, I would have
to spend some time researching this)

-- 
Joel

Attachment: subst.diff
Description: Text document


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