This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/dwarf/doc] Inter-compilation-unit reference support for partial DIEs
- From: Jim Blandy <jimb at redhat dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sources dot redhat dot com, ezannoni at redhat dot com
- Date: 05 Aug 2004 12:20:45 -0500
- Subject: Re: [rfa/dwarf/doc] Inter-compilation-unit reference support for partial DIEs
- References: <20040420170855.GA31548@nevyn.them.org><20040617034201.GD23443@nevyn.them.org><20040715184431.GA25807@nevyn.them.org><20040804230536.GA30848@nevyn.them.org>
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.