This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA/dwarf] Eliminate dwarf2_tmp_obstack
- 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
- Date: 19 Apr 2004 01:32:38 -0500
- Subject: Re: [RFA/dwarf] Eliminate dwarf2_tmp_obstack
- References: <20040419031744.GA22586@nevyn.them.org>
Daniel Jacobowitz <drow@false.org> writes:
> dwarf2_tmp_obstack serves as a general purpose dumping ground. After my
> previous patches, there are only two things left on it: the linked list we
> use to fudge GCC 2.95 line number tables (some day soon I think this hack
> should go away; it was primarily for the benefit of the testsuite, and was
> fixed at least as of GCC 3.1), and the block structures created in
> read_attribute_value.
>
> Both of these are clearly associated with a particular compilation unit.
> If we put them on the comp_unit_obstack, then we don't have any need for
> the global obstack any more.
>
> Since my following patches change the lifetimes of individual CUs, I felt
> this was a worthwhile cleanup. OK?
You need to fix up the comments above free_stack_comp_unit; it's no
longer "only used during partial symbol processing".
I'd like free_stack_comp_unit renamed to free_comp_unit_obstack, so
that when I search for comp_unit_obstack, I'll also run into the calls
to make_cleanup that will free it.
Otherwise, looks good.