[RFA/dwarf] Anonymous nested function causes SEGV during psymbol read

Joel Brobecker brobecker@adacore.com
Tue Mar 16 21:19:00 GMT 2010


> Joel> +	  /* Ignore subprograms that do not have a name.  Such entries
> Joel> +	     are incorrect, according to the DWARF standard, and we need
> Joel> +	     a function name to create the associated partial symbol.  */
> Joel> +	  if (!pdi->is_declaration && pdi->name)
> Joel>              add_partial_symbol (pdi, cu);
> 
> I think it is worthwhile to call complaint for invalid DWARF.

Thanks again for the feedback.  Attached is a new version of the patch,
with the complaints added.  Since I also added a complaint for the
non-nested case, I also extended the testcase to cover that case as
well.

I will leave the patch out for review for a while, and hopefully commit
sometime next week, if there are no objections.

-- 
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dw2-anon-func.diff
Type: text/x-diff
Size: 12953 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100316/a28c7998/attachment.bin>


More information about the Gdb-patches mailing list