[gnu.gdb.bug] gdb patch for "Invalid symbol data" message

beihl%cadillac.cad.mcc.com@MCC.COM (Gary Beihl) (10/11/88)

This is on a Sun-4 running OS4.0.  The Sun compiler seems to be
putting an N_SLINE symbol with a negative line number (-1) immediately
following a library definition ("-lg" in this case). Gdb expects the
source file name to immediately follow and prints the message:
"Invalid symbol data: does not start by identifying a source file."
The attached patch to dbxread.c prevents this message.

Gary Beihl (beihl@mcc.com)

*** dbxread.c.orig	Sun Sep 11 01:32:15 1988
--- dbxread.c	Mon Oct 10 15:11:28 1988
***************
*** 1674,1679 ****
--- 1674,1683 ----
  	/* This code appears in libraries on Gould machines.  */
  	return;
  
+       if (type == N_SLINE && desc == -1)
+         /* This code is used by the Sun4 compiler; ignore it */
+         return;
+ 
        /* This should give an aborting error.  */
        printf ("Invalid symbol data: does not start by identifying a source file.\ntype == %d\n\n", type);
        return;

-------