This is the mail archive of the gdb-patches@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: [rfa/dwarf/doc] Inter-compilation-unit reference support for partial DIEs


Okay.  I've started to review this.

One thought on what I understand so far:

The way read-in compilation units are chained through alternating
'struct dwarf2_cu' objects and 'struct dwarf2_per_cu_data' nodes is
kind of weird.  And the name 'struct dwarf2_per_cu_data' is not
great --- 'struct dwarf2_cu' is also per-CU data.

Would it work to simply place the 'struct dwarf2_cu' objects
themselves directly into the tree, add a 'read_in' flag, and get rid
of dwarf2_per_cu_data altogether?  The memory consumption doesn't
seem like it matters: GDB has 300 CU's, so a 300-byte structure per
CU would add up to ~90k.  You've been watching memory consumption,
so you can say better than I how this looks.

Putting the dwarf2_cu objects directly in the tree would also remove
the need for a read_in_chain: you could just walk the whole tree.
The splay tree accessor functions would replace the linked list
wrangling.


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