This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Simplify partial dies
[Sorry about the dupe, Tom.]
On Mon, Nov 02, 2009 at 12:43:52PM -0700, Tom Tromey wrote:
> >>>>> "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.
Good point. I'm not sure about the one before my patch, but after I'm
confident you're right.
--
Daniel Jacobowitz
CodeSourcery