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: dwarves, hierarchies, and cross-references


On Fri, May 09, 2003 at 04:14:18PM -0700, David Carlton wrote:
> * Once we notice that we put E in the wrong context, update everybody
>   who has been misled by this.  This seems complicated and potentially
>   fragile to me: exactly what data would we have to maintain to make
>   this work?

Too fragile I think.

> * When parsing E via a cross-reference, figure out its context, so we
>   can name it correctly.  This seems like a plausible idea to me; I'm
>   only worried that it might be a little inefficient at times.

Yes.  We already read in the whole CU at a time and build the DIE
structure in memory, and then walk the DIE structure to build types. 
All we have to do is increase the memory usage of the DIEs slightly by
adding a backchain up the hierarchy.  A simliar thing works for
inter-CU references.  Then we can walk up the chain looking for
enclosing classes or namespaces, and get their names; and we have a
DIE->name convertor.

This requires some cleanup in the reader, but nothing revolutionary.

We also need the context in some other places.  For instance, to
associate method implementations to method declarations; and for
templates and inline functions.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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