Article View: gnu.gdb.bug
Article #202gdb 3.2 core-dumping fix.
From: Bryan Boreham
Date: Wed, 19 Jul 1989 17:02
Date: Wed, 19 Jul 1989 17:02
36 lines
1682 bytes
1682 bytes
I think this is a valid fix for gdb:
*** dbxread.c~ Tue Jul 11 03:38:46 1989
--- dbxread.c Wed Jul 19 16:16:42 1989
***************
*** 4254,4259 ****
--- 4254,4263 ----
The `?' is a placeholder for one of '+' (public visibility),
'0' (protected visibility), and '-' (private visibility). */
+ /* Change by Bryan Boreham, Kewill, Wed Jul 19 15:02:04 1989.
+ We better set p right now, in case there are no fields at all... */
+ p = *pp;
+
while (**pp != ';')
{
int visibility;
I'm sorry, but I don't have a example small enough to post that
demonstrates the core-dump.
The problem occurred whilst using C++ 1.35.1-. Basically, if there are
no data fields in a struct, then in function read_struct_type, **pp
will be ';' the first time we get to line 4257, so the loop will be
skipped, leading to line 4344, that reads "if (p[1] == ':')", and p
has not been initialised.
My fix cures the core-dump, but I don't know enough about gdb or dbx
format to tell if it will break something else.
Bryan Boreham bryan@kewill.uucp
Software Engineer || bryan%kewill@uunet.uu.net
Kewill Systems PLC || ... uunet!mcvax!ukc!root44!kewill!bryan
Walton-On-Thames
Surrey, England Telephone: (+44) 932 248 328
Technical Details
Message-ID:
<8907191702.AA04647@edinburgh.kewill.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!kewill!bryanShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!kewill!bryan From: kewill!bryan@UUNET.UU.NET (Bryan Boreham) Newsgroups: gnu.gdb.bug Subject: gdb 3.2 core-dumping fix. Message-ID: <8907191702.AA04647@edinburgh.kewill.uucp> Date: 19 Jul 89 17:02:02 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 36