🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10210

Help. Bad symbol data

#10210
From: David Fox
Date: Wed, 31 Jan 1990 15:38
51 lines
2480 bytes
I wish I could send a better report than what follows,
but I can't figure out how to get at this one.  When
I compile the InterViews version 2.6-beta libraries
(libInterViewsX11.a and libgraphic.a) g++-1.36.4, and
I compile a program that uses structured graphics, 
and then I run gdb-3.4 on that program and try to set
a breakpoint in main, I get this message:

(gdb) break main
Reading in symbols for main.C...Invalid symbol data: invalid character \075
	at symbol pos 194.

I have tried to debug gdb, and I have learned that the
symbol data in question looks like this: (adding '\n' after
each ';'):

painters:/0598=*599=xsGraphicToPainter::Graphic$painters;
p:/030:Graphic$p;
Graphic::600=#597,601=*597,601,601,15;
:__7GraphicPT0;
2.602=#597,15,601,1,15;
:_$_Graphic;
2*-2147483647;;

In the function read_struct_type in gdb file dbxread.c,
type_name is called to read the field type when *pp points
to the '5' in "/0598":

       /* else normal dbx-style format.  */

=>    list->field.type = read_type (pp);

read_type reads the 598, and then takes the '*' case and calls
read_type again.  This one reads 599, takes the 's' case and
eventually reaches this code:

          /* Note: for C++, the cross reference may be to a base type which
             has not yet been seen.  In this case, we skip to the comma,
             which will mark the end of the base class name.  (The ':'
             at the end of the base class name will be skipped as well.)
             But sometimes (ie. when the cross ref is the last thing on
             the line) there will be no ','.  */
          from = (char *) index (*pp, ',');
          if (from)
            *pp = from;

This call to index returns a pointer to the next comma, way ahead
of where we were.  After that it sees an '=' where it shouldn't
and bombs out.  Please help me, I'm stuck.

-david
Technical Details
Message-ID: <9001311538.AA19638@life.ai.mit.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!allegra.tempo.nj.att.com!fox

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,b44534008d557aa6,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-01-31 13:01:33 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!allegra.tempo.nj.att.com!fox
From: fox@allegra.tempo.nj.att.com (David Fox)
Newsgroups: gnu.gdb.bug
Subject: Help.  Bad symbol data
Message-ID: <9001311538.AA19638@life.ai.mit.edu>
Date: 31 Jan 90 15:38:19 GMT
Sender: news@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 51
Posted: Wed Jan 31 16:38:19 1990