Bug 76958 - can't find class named `A::B', as given by C++ RTTI
Summary: can't find class named `A::B', as given by C++ RTTI
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gdb
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elena Zannoni
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-30 06:01 UTC by Sam Varshavchik
Modified: 2015-01-08 00:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-18 16:17:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Sam Varshavchik 2002-10-30 06:01:56 UTC
Description of Problem:

In certain situations involving nested C++ classes gdb fails to find type
information of class objects, and reports an internal error message.

Version-Release number of selected component (if applicable):

gdb-5.2.1-4
gcc-3.2-7

How Reproducible:

always

Steps to Reproduce:

Script started on Wed Oct 30 00:58:14 2002
$ cat foo.C

class Bsuper {
	public:
		int bsuper;

		Bsuper() : bsuper(0) {}

		virtual void foo()=0;

};

static void foobar(void *vp)
{
}

class A {
	class B;
	public:
	friend class B;

	A();
};

class A::B : public Bsuper {
	public:
		int b;

	B() : b(0)
		{
		}

		void foo() {}
};

A::A()
{
	B b;

	foobar(&b);
}

int main()
{
	A a;

}
$ g++ -g -o foo foo.C
$ gdb foo
GNU gdb Red Hat Linux (5.2.1-4)
Copyright 2002 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 "i386-redhat-linux"...
(gdb) break main
Breakpoint 1 at 0x804851a: file foo.C, line 44.
(gdb) run
Starting program: /var/tmp/foo 

Breakpoint 1, main () at foo.C:44
44		A a;
(gdb) s
A (this=0xbffff9a7) at foo.C:37
37		B b;
(gdb) s
B (this=0xbffff970) at foo.C:29
29			{
(gdb) n
30			}
(gdb) print *this

Actual Results:

can't find class named `A::B', as given by C++ RTTI

Expected Results:

Contents of the current object.

Additional Information:

Comment 1 Elena Zannoni 2002-10-31 21:40:34 UTC
Yes, there are several limitations with gdb abd c++. I'll push your bug report
upstream to the
 FSF gdb community.  People are actively working to make gdb's c++ support
better.
Thanks for your detailed bug report.


Comment 2 Bill Nottingham 2006-08-07 18:53:55 UTC
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
Please check if this issue is still present in a current Fedora Core
release. If so, please change the product and version to match, and
check the box indicating that the requested information has been
provided. Note that any bug still open against Red Hat Linux on will be
closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.

Comment 3 Bill Nottingham 2006-10-18 16:17:16 UTC
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.


Note You need to log in before you can comment on or make changes to this bug.