[Patch] Use "<unknown>" instead of NULL when a symbol isn't found

Sterling Augustine saugustine@google.com
Mon Dec 23 23:17:00 GMT 2013


On Fri, Dec 20, 2013 at 10:16 AM, Tom Tromey <tromey@redhat.com> wrote:
> I wonder whether some correction or workaround is required elsewhere.

There are various parts of linepec.c that assume that this field is
never null, either by assertion or by dereferencing it. Any other
workaround (at least for the case I'm dealing with) would probably
just print an error message.

>
> Sterling> The following patch simply assigns the symbol name as "<unknown>"
> Sterling> instead of NULL, allowing the debugger to make forward progress in the
> Sterling> face of an erroneous debug line table entry.
>
> You didn't say whether you regression-tested this; but assuming so, it
> is ok.

I did run regressions and it didn't introduce any new ones.

Thanks. Committed as posted.



More information about the Gdb-patches mailing list