This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
RE: c++/1069: Issues printing derived objects with gdb
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 3 Mar 2003 20:08:01 -0000
- Subject: RE: c++/1069: Issues printing derived objects with gdb
- Reply-to: Daniel Jacobowitz <drow at mvista dot com>
The following reply was made to PR c++/1069; it has been noted by GNATS.
From: Daniel Jacobowitz <drow at mvista dot com>
To: gdb-gnats at sources dot redhat dot com
Cc:
Subject: RE: c++/1069: Issues printing derived objects with gdb
Date: Mon, 3 Mar 2003 14:58:45 -0500
----- Forwarded message from Monte Becker <monte at juniper dot net> -----
Date: Wed, 19 Feb 2003 14:48:37 -0500
From: "Monte Becker" <monte at juniper dot net>
Subject: RE: c++/1069: Issues printing derived objects with gdb
To: "Daniel Jacobowitz" <drow at mvista dot com>
Owch...
I had to use the new version of GDB to get the stack dump. This is hurting my head!
Anyhow, here's the stack below. BTW, in my large program, I can easily reproduce the
"print causes program to continue" bug.
monte-cristo > /ldisk/work/monte/gdb-current/buildDir/gdb/gdb /ldisk/work/monte/gdb-current/buildDir/gdb/gdb
GNU gdb 2003-02-19-cvs
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) run a.out
Starting program: /ldisk/work/monte/gdb-current/buildDir/gdb/gdb a.out
GNU gdb 2003-02-19-cvs
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) b main
Breakpoint 1 at 0x107b0: file main.C, line 9.
(gdb) run
Starting program: /home/monte/foo/a.out
Breakpoint 1, main () at main.C:9
9 uniform_rv a ( 3, 10 );
(gdb) n
11 uniform_rv *b = &a;
(gdb)
13 random_variable *c = b;
(gdb) p c.gen()
Program received signal SIGSEGV, Segmentation fault.
0x7f933344 in strlen () from /usr/lib/libc.so.1
(gdb) where
#0 0x7f933344 in strlen () from /usr/lib/libc.so.1
#1 0x001c4b50 in int_vasprintf (result=0xffbec6cc, format=0x1d3aa0 "Cannot resolve method %s%s%s to any overloaded instance", args=0xffbec644) at ../../libiberty/vasprintf.c:128
#2 0x001c4c98 in vasprintf (result=0xffbec6cc, format=0x1d3aa0 "Cannot resolve method %s%s%s to any overloaded instance", args=0xffbec808) at ../../libiberty/vasprintf.c:158
#3 0x000dcfa8 in xvasprintf (ret=0xffbec6cc, format=0x1d3aa0 "Cannot resolve method %s%s%s to any overloaded instance", ap=0xffbec808) at ../../gdb/utils.c:1191
#4 0x000de220 in vfprintf_unfiltered (stream=0x6ce1a0, format=0x1d3aa0 "Cannot resolve method %s%s%s to any overloaded instance", args=0xffbec808) at ../../gdb/utils.c:2148
#5 0x000dc74c in verror (string=0x1d3aa0 "Cannot resolve method %s%s%s to any overloaded instance", args=0xffbec808) at ../../gdb/utils.c:612
#6 0x000dc778 in error (string=0x1d3aa0 "Cannot resolve method %s%s%s to any overloaded instance") at ../../gdb/utils.c:621
(gdb) exit
Undefined command: "exit". Try "help".
(gdb) quit
The program is running. Exit anyway? (y or n) y
> -----Original Message-----
> From: Daniel Jacobowitz [mailto:drow at mvista dot com]
> Sent: Wednesday, February 19, 2003 1:02 PM
> To: Monte Becker
> Subject: Re: c++/1069: Issues printing derived objects with gdb
>
>
> On Wed, Feb 19, 2003 at 12:59:34PM -0500, Monte Becker wrote:
> >
> >
> > > -----Original Message-----
> > > From: Daniel Jacobowitz [mailto:drow at mvista dot com]
> > ....
> > > OK, you're on Solaris. Is there a chance you could get a current
> > > version of GDB from CVS (Kevin fixed some Solaris problems
> > > with calling
> > > functions yesterday, I think), and try again? If it
> still coredumps,
> > > compile GDB with "-g" and get a backtrace from the coredump.
> >
> > OK, give me a clue. How do I get stuff from CVS?
>
> Take a look at http://sources.redhat.com/gdb/current/. Let me know if
> you've got any questions - always looking for improvements to
> the docs.
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>
----- End forwarded message -----
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer