[RFA] Avoid core dumping on corrupt stabs entry

Michael Snyder msnyder@cygnus.com
Tue Mar 28 10:32:00 GMT 2000


Chris Faylor wrote:
> 
> Any objections to this patch?  It seems to be in the spirit of the rest
> of the file.

Looks good to me.  JimB?

> 2000-03-27  Christopher Faylor  <cgf@cygnus.com>
> 
>         * partial-stab.h: Add one more check against corrupted or irregular
>         stabs entry.
> 
> Index: partial-stab.h
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/partial-stab.h,v
> retrieving revision 2.68
> diff -u -p -r2.68 partial-stab.h
> --- partial-stab.h      1999/09/14 22:50:39     2.68
> +++ partial-stab.h      2000/03/28 01:37:53
> @@ -393,7 +393,7 @@ switch (CUR_SYMBOL_TYPE)
> 
>  #ifdef DBXREAD_ONLY
>      /* See if this is an end of function stab.  */
> -    if (CUR_SYMBOL_TYPE == N_FUN && *namestring == '\000')
> +    if (pst && CUR_SYMBOL_TYPE == N_FUN && *namestring == '\000')
>        {
>         unsigned long valu;
>


More information about the Gdb-patches mailing list