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: DW_AT_specification and partial symtabs


On Fri, 13 Jun 2003 11:38:38 -0400, Andrew Cagney
<ac131313@redhat.com> said:

> If psymtab's are dumped (or at least burried) the core GDB <->
> symtab interface is simplified/tightened, people can change the
> internals without breaking everything. David, I belive, has been
> working in that direction.

Yeah.  I was thinking about this a little bit over the weekend (albeit
while not at a computer, so I haven't actually looked at GDB's source
code): from the point of view of looking up symbols by names, I don't
think we have too far to go.  If memory serves me well, the only
functionality that I haven't encapsulated in that regard is symbol
completion and regexp matching.  It would be easy to add methods for
those two to the dictionary interface; once we do that, I think there
would be no particular technical barrier to hiding the psymtab aspect
of name lookup inside the dictionaries.

Though it would take some restructuring of code elsewhere to actually
achieve this: right now, dictionaries live in blocks, and blocks live
in symtabs, not psymtabs.  So if we really want to start getting rid
of psymtabs, we'd have to rethink the symtab/psymtab data structures
themselves, so there's just one place to look for information of
various sorts.  (Which would presumably involve turning them opaque as
well.)  Still, it's a start.

It would be an interesting exercise to think about what interface this
new opaque symtab data structure would export, and how much of that
interface could be implemented lazily in the DWARF 2 case...

David Carlton
carlton@math.stanford.edu


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