This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/DWARF] do not use dwarf2_per_objfile in dwarf2_per_objfile_free.
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org, Doug Evans <dje at google dot com>
- Date: Wed, 19 Jun 2013 11:42:37 -0600
- Subject: Re: [RFA/DWARF] do not use dwarf2_per_objfile in dwarf2_per_objfile_free.
- References: <1370884394-16360-1-git-send-email-brobecker at adacore dot com> <87sj0f8m7h dot fsf at fleche dot redhat dot com> <20130618233716 dot GF5560 at adacore dot com>
Tom> You could consider setting 'dwarf2_per_objfile = NULL' at the start of
Tom> the function, to try to prevent future bugs along these lines.
Joel> I certainly could, if you'd like. I am a little afraid of what might
Joel> happen if I do, though ;-).
I'll give it a try.
I think the intent for this module is that all entry routes into
dwarf2read from the outside ought to set up dwarf2_per_objfile,
generally via dw2_setup. Arguably the deletion function should do so
too; but NULLing seems just as good.
Tom