🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10064

Fix for gdb COFF symbol table readers

#10064
From: Janice Ann Lacy
Date: Tue, 03 Jul 1990 23:01
52 lines
2108 bytes
When reading a COFF symbol table, gdb encounters errors that usually
are seen as missing symbols while debugging but can cause the symtab
read to fail with "Invalid symbol data: .bf/.ef/.bb/.eb symbol m..."
or "Invalid symbol data: .bb/.eb symbol mismatch at...". The problem
is in reading enum symbols, it gobbles up some sym entries after the
end of the enum symbols. Here's the simple fix:

*** coffread.c~	Tue Jul  3 17:49:57 1990
--- coffread.c	Tue Jul  3 17:50:24 1990
***************
*** 1920,1925 ****
--- 1920,1926 ----
  #else
    int offset = 0;
  #endif
+   int done = 0;
  
    type = coff_alloc_type (index);
    if (within_function)
***************
*** 1928,1934 ****
      symlist = &file_symbols;
    osyms = *symlist;
  
!   while (symnum < lastsym && symnum < nlist_nsyms_global)
      {
        read_one_sym (ms, &sub_sym, &sub_aux);
        name = ms->c_name;
--- 1929,1935 ----
      symlist = &file_symbols;
    osyms = *symlist;
  
!   while (!done && symnum < lastsym && symnum < nlist_nsyms_global)
      {
        read_one_sym (ms, &sub_sym, &sub_aux);
        name = ms->c_name;
***************
*** 1949,1954 ****
--- 1950,1956 ----
  	    break;
  
  	  case C_EOS:
+ 	    done = 1;
  	    break;
  	}
      }

------------------------------------------------------------------------
Janice Ann Lacy                     Voice: (603) 878-4268
Lacy Software                       UUCP:  m2c!jjmhome!jalhome!jal
P.O. Box 130, Colburn Rd.
Temple, NH 03084
Technical Details
Message-ID: <108@jalhome.UUCP>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!usc!ucsd!pacbell.com!lll-winken!bu.edu!xylogics!transfer!crackers!m2c!jjmhome!jalhome!jal

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,45af0f21dcabef1c,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-07-03 22:03:22 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!usc!ucsd!pacbell.com!lll-winken!bu.edu!xylogics!transfer!crackers!m2c!jjmhome!jalhome!jal
From: jal@jalhome.UUCP (Janice Ann Lacy)
Newsgroups: gnu.gdb.bug
Subject: Fix for gdb COFF symbol table readers
Keywords: COFF
Message-ID: <108@jalhome.UUCP>
Date: 3 Jul 90 23:01:07 GMT
Organization: Lacy Software
Lines: 52
Posted: Wed Jul  4 00:01:07 1990