🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10164

Re: COFF symbol reading problem (hint + other coff patches)

#10164
From: Peter Schauer
Date: Mon, 02 Apr 1990 17:44
49 lines
2628 bytes
I had exactly the same problem you described and tracked it down to
the same reasons. However your patch will omit a lot of useful symbols
I hacked gcc to circumvent the linker problem and now I dont have to hack gdb
and still get all symbols. I'll post the patches (and some other COFF related
patches) to gcc.bug as they belong there. If you are unable to get
them from gcc.bug, please mail me.

Peter Schauer		 pes@tumuc.e-technik.tu-muenchen.dbp.de


The following patches should be applied to gdb to make COFF support better:
*** ./coffread.c.orig	Tue Feb 27 10:18:55 1990
--- ./coffread.c	Sun Apr  1 17:42:58 1990
***************
*** 550,556 ****
      }
    misc_bunch->contents[misc_bunch_index].name = savestring (name, strlen (name));
    misc_bunch->contents[misc_bunch_index].address = address;
!   misc_bunch->contents[misc_bunch_index].type = mf_unknown;
    misc_bunch_index++;
    misc_count++;
  }
--- 550,556 ----
      }
    misc_bunch->contents[misc_bunch_index].name = savestring (name, strlen (name));
    misc_bunch->contents[misc_bunch_index].address = address;
!   misc_bunch->contents[misc_bunch_index].type = mf_text;
    misc_bunch_index++;
    misc_count++;
  }
***************
*** 984,989 ****
--- 984,999 ----
  		    /* flush rest of '.' symbols */
  		    break;
  	    }
+ 	    /* Strip gcc temp labels */
+ 	    if (cs->c_name[0] == 'L'
+ 		&& (strncmp(cs->c_name,"LI%",3) == 0
+ 		   || strncmp(cs->c_name,"LC%",3) == 0
+ 		   || strncmp(cs->c_name,"LP%",3) == 0
+ 		   || strncmp(cs->c_name,"LPB%",4) == 0
+ 		   || strncmp(cs->c_name,"LBB%",4) == 0
+ 		   || strncmp(cs->c_name,"LBE%",4) == 0
+ 		   || strncmp(cs->c_name,"LPBX%",5) == 0))
+ 		break;
  	    /* fall in for static symbols that don't start with '.' */
  	  case C_EXT:
  	    if (cs->c_sclass == C_EXT &&
Technical Details
Message-ID: <980@tumuc.UUCP>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!tumuc!pes
References: <1990Mar27.195402.5339@esegue.segue.boston.ma.us> <1990Mar28.135444.12665@granite.cr.bull.com> <1990Mar28.163706.2474@esegue.segue.boston.ma.us>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,f5315168aca7ec9
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-04-02 21:30:55 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!tumuc!pes
From: pes@tumuc.e-technik.tu-muenchen.dbp.de (Peter Schauer)
Newsgroups: gnu.gdb.bug
Subject: Re: COFF symbol reading problem (hint + other coff patches)
Message-ID: <980@tumuc.UUCP>
Date: 2 Apr 90 17:44:21 GMT
References: <1990Mar27.195402.5339@esegue.segue.boston.ma.us> <1990Mar28.135444.12665@granite.cr.bull.com> <1990Mar28.163706.2474@esegue.segue.boston.ma.us>
Sender: news@tumuc.UUCP
Reply-To: pesrem@tumuc.UUCP (Peter Schauer)
Distribution: gnu
Organization: Technical University of Munich, West-Germany
Lines: 49
Posted: Mon Apr  2 18:44:21 1990