🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #474

mips symbol read error and infinite loop

#474
From: oerder
Date: Wed, 14 Oct 1992 14:18
62 lines
2246 bytes
The following is a bug in gdb, and, probably, also in gcc.

Configuration:
==============
gdb-4.6 decstation
gcc-2.2.2 decstation
DECStation 5000/200, Ultrix 4.2
.gdbinit contains 'set complaint 10'

For the simple test program below, gdb complains when reading
the symbols and enters a infinite loop when printing 'a'.


************************* bug.c *******************************
struct bug {void *x;};

int main()
  {
  struct bug a;
  return 0;
  }
***************************************************************

% gcc -g bug.c -o bug
% gdb bug
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.6, Copyright 1992 Free Software Foundation, Inc...
(gdb) b main
During symbol reading, guessed tag type of struct bug incorrectly.
During symbol reading, stEnd with storage class 1 not handled.
Breakpoint 1 at 0x4001a4: file bug.c, line 6.
(gdb) run
During symbol reading, stEnd with storage class 1 not handled.

Breakpoint 1, main () at bug.c:6
6	  return 0;
(gdb) p a
$1 = {x = {x = {x = {x = {x = {x = {x = {x = .....

.... Quit
(gdb) q
%

***************************************************************

(where I have put the '.......' gdb continues to print '{x = ' in
an infinite loop until ^C^C.

The problem seems to arise only if the first element of the structure
is of type 'void*'.



Martin

-------------------------------------------------------------
Martin Oerder       			Tel. +49 241 6003 529
Philips Research			Fax  +49 241 6003 518
Weisshausstrasse 2, 5100 Aachen		oerder@pfa.philips.de
-------------------------------------------------------------
Technical Details
Message-ID: <9210141216.AA17974@ds5mi2.pfa.philips.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!philfa.pfa.PHilips.DE!oerder

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!philfa.pfa.PHilips.DE!oerder
From: oerder@philfa.pfa.PHilips.DE
Subject: mips symbol read error and infinite loop
Message-ID: <9210141216.AA17974@ds5mi2.pfa.philips.de>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 14 Oct 1992 14:18:44 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 63