This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/539: c++ vtable bug



>Number:         539
>Category:       gdb
>Synopsis:       c++ vtable bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 11 05:28:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     mne@mosaic-ag.com
>Release:        gdb 5.2
>Organization:
>Environment:
linux, binutils 2.12, gcc 3.0.4
>Description:
if a object pointer refers an instance if class living
in a namespace gdb is not able to find the class via rtti.

$ gdb m
GNU gdb 5.2
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 "i686-pc-linux-gnu"...
(gdb) break main
Breakpoint 1 at 0x8048759: file m.cc, line 20.
(gdb) run
Starting program: /tmp/m 

Breakpoint 1, main () at m.cc:20
20              N::A *a = new N::B;
(gdb) n
21              return 0;
(gdb) p *a
can't find class named `N::B', as given by C++ RTTI
(gdb) 
>How-To-Repeat:
compile the attached code
g++ -g -om m.cc
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="m.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="m.cc"

bmFtZXNwYWNlIE4KewoJY2xhc3MgQQoJewoJcHVibGljOgoJCXZpcnR1YWwgdm9pZCBmICh2b2lk
KSA9IDA7Cgl9OwoKCWNsYXNzIEIgOiBwdWJsaWMgQQoJewoJcHVibGljOgoJCUIgKHZvaWQpIHt9
CgkJfkIgKHZvaWQpIHt9CgkJdm9pZCBmICh2b2lkKSB7fQoJfTsKfQoKaW50IG1haW4gKHZvaWQp
CnsKCU46OkEgKmEgPSBuZXcgTjo6QjsKCXJldHVybiAwOwp9Cg==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]