This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Simplify partial dies
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 02 Nov 2009 12:43:52 -0700
- Subject: Re: RFC: Simplify partial dies
- References: <20091102152607.GA10051@caradoc.them.org>
- Reply-to: tromey at redhat dot com
>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
Daniel> - if (comp_unit_die.dirname)
Daniel> - pst->dirname = obsavestring (comp_unit_die.dirname,
Daniel> - strlen (comp_unit_die.dirname),
Daniel> + attr = dwarf2_attr (comp_unit_die, DW_AT_comp_dir, &cu);
Daniel> + if (attr != NULL)
Daniel> + pst->dirname = obsavestring (DW_STRING (attr),
Daniel> + strlen (DW_STRING (attr)),
Daniel> &objfile->objfile_obstack);
Is this obsavestring actually needed? I thought a DW_STRING value
necessarily had to live as long as the symbol tables, so did not need to
be copied; but if that isn't so, I would like to know.
Tom