🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #8893

crash in gdb 4.6 on Sun 4/330

#8893
From: Douglas Scott
Date: Thu, 16 Jul 1992 20:49
108 lines
4286 bytes
Problem:  Gdb crashes in ptype command when debugging C++ code
System:  Sun 4/330 running SunOS 4.1
Version:  Gdb 4.6 compiled with gcc 2.1:
	configured sparc-sun-sunos4.1
	(using -DGCC_MANGLE_BUG for gdb/symtab.c)

Here is a transcript of gdb 4.6 being debugged with gdb 4.5:

tango> /usr/local/bin/gdb gdb
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.5, Copyright 1992 Free Software Foundation, Inc...
Setting up the environment for debugging gdb.
Breakpoint 1 at 0x331ec: file utils.c, line 274.
Breakpoint 2 at 0x4708: file main.c, line 1658.
(top-gdb) run ~/C++/mxv
Starting program: /snd3/src/gnu/gdb-4.6/gdb/gdb ~/C++/mxv
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...
Setting up the environment for debugging gdb.
Function "fatal" not defined.
(gdb) cd ~/C++
Working directory /home/doug/C++.
(gdb) source .gdbinit
(gdb) ptype Controller
type = class Controller : public ivResource {
  private:
    static struct Controller *head;
    static int windowsOpen;
    struct Controller *prev;
    struct Controller *next;
  public:
    static struct DialogConstructor *globalConstructor;
  protected:
    char *name;
    struct Data *model;
    struct DataWindow *view;
    struct Editor *editor;
    struct ControllerStyle *style;
    struct DialogConstructor *constructor;

    <badly mangled name P6EditorPCc>;
    <badly mangled name P4DataPCc>;
  public:
    <badly mangled name PCc>;
    virtual ~Controller ();
  protected:

Program received signal 11, Segmentation fault
0xf6ee5104 in _doprnt ()
(top-gdb) bt
#0  0xf6ee5104 in _doprnt ()
#1  0xf6efffd0 in vsprintf ()
#2  0x34588 in vfprintf_filtered (stream=0xceb04, format=0x1dc84 "%s", 

    args=0xf7fff73c "") at utils.c:1208
#3  0x345bc in fprintf_filtered (__builtin_va_alist=846596) at utils.c:1228
#4  0x1e31c in type_print_base (type=0x36d898, stream=0xceb04, show=1000840, 

    level=0) at valprint.c:1905
#5  0x1d32c in type_print_1 (type=0x36d898, varstring=0x1eefc "", 

    stream=0xceb04, show=1, level=0) at valprint.c:1363
#6  0x1d308 in type_print (type=0x36d898, varstring=0x1eefc "", 

    stream=0xceb04, show=1) at valprint.c:1346
#7  0x2043c in ptype_command (typename=0xe600e "Controller", from_tty=1)
    at printcmd.c:1130
#8  0x38d4 in execute_command (p=0xe600e "Controller", from_tty=1)
    at main.c:915
#9  0x3a88 in command_loop () at main.c:976
#10 0x36dc in main (argc=2, argv=0xf7fffc24) at main.c:853
(top-gdb) up 2
#2  0x34588 in vfprintf_filtered (stream=0xceb04, format=0x1dc84 "%s", 

    args=0xf7fff73c "") at utils.c:1208
1208      vsprintf (linebuffer, format, args);
(top-gdb) list
1203        }
1204    

1205    

1206      /* This won't blow up if the restrictions described above are
1207         followed.   */
1208      vsprintf (linebuffer, format, args);
1209    

1210      fputs_filtered (linebuffer, stream);
1211    }
1212    

(top-gdb) info args 

stream = (struct _iobuf *) 0xceb04
format = 0x1dc84 "%s"
args = 0xf7fff73c ""

Please email me if you need more information.

---
Douglas Scott                              (805)893-8352
Center for Computer Music Research and Composition
University of California, Santa Barbara
Internet: (NeXTMail ok)   <doug@foxtrot.ccmrc.ucsb.edu>
Technical Details
Message-ID: <9207162049.AA01991@foxtrot.ccmrc.ucsb.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!foxtrot.ccmrc.ucsb.edu!doug

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,495ea292b5577909,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1992-07-16 11:48:38 PST
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!foxtrot.ccmrc.ucsb.edu!doug
From: doug@foxtrot.ccmrc.ucsb.edu (Douglas Scott)
Subject: crash in gdb 4.6 on Sun 4/330
Message-ID: <9207162049.AA01991@foxtrot.ccmrc.ucsb.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 16 Jul 1992 20:49:07 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 109