Article View: gnu.gdb.bug
Article #10211Help. Bad symbol data
From: Michael Tiemann
Date: Wed, 31 Jan 1990 16:04
Date: Wed, 31 Jan 1990 16:04
68 lines
3379 bytes
3379 bytes
Date: Wed, 31 Jan 90 10:38:19 EST From: fox@allegra.tempo.nj.att.com (David Fox) 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 This is a bug in the GDB reader. What's happened is that `painters' is a static class member, which means it's like a TYPE_FIELD, but has static storage. Its type is type pointer-to-GraphicToPainter, which is output while trying to describe the TYPE_FIELD. GDB's reader must be fixed to handle this case. Namely, it is not correct for GDB to assume inside of `read_type' that skipping is to be done in this case. This might be hard to fix inside GDB--perhaps the right thing to do is topologically sort all the types to be output so that there are no undefined cross references, a change that needs to be made in the compiler. Michael
Technical Details
Message-ID:
<9001311604.AA13090@arkesden.sun.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!tut.cis.ohio-state.edu!arkesden.eng.sun.com!tiemannReferences:
<9001311538.AA19638@life.ai.mit.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,b44534008d557aa6 X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 1990-01-31 13:48:04 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!tut.cis.ohio-state.edu!arkesden.eng.sun.com!tiemann From: tiemann@arkesden.eng.sun.com (Michael Tiemann) Newsgroups: gnu.gdb.bug Subject: Help. Bad symbol data Message-ID: <9001311604.AA13090@arkesden.sun.com> Date: 31 Jan 90 16:04:33 GMT References: <9001311538.AA19638@life.ai.mit.edu> Sender: daemon@tut.cis.ohio-state.edu Reply-To: tiemann@sun.com Distribution: gnu Organization: GNUs Not Usenet Lines: 68 Posted: Wed Jan 31 17:04:33 1990