This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Simplify partial dies


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]