| Reporter's email: |
mec.gnu@mindspring.com |
CC these people on PR status email: |
|
| |
|
| Number: |
1734
|
| Category: |
c++
|
| Synopsis: |
gdb loses the name of an empty class
|
| Confidential: |
no
|
| Severity: |
serious
|
| Priority: |
medium
|
| Responsible: |
unassigned
|
| State: |
open
|
| Class: |
sw-bug
|
| Submitter-Id: |
net
|
| Arrival-Date: |
Fri Aug 06 09:58:01 UTC 2004
|
| Closed-Date: |
|
| Last-Modified: |
|
| Originator: |
mec.gnu@mindspring.com
|
| Release: |
gdb 6.2
|
| Organization: |
|
| Environment: |
native i686-pc-linux-gnu
gdb 6.2
gcc HEAD 20040804
binutils 2.15
dwarf-2
|
| Description: |
When gdb is presented with a completely empty class, it doesn't store the name of the class properly.
From the attached typescript:
(gdb) ptype E0
type = void (struct E0 * const)
(gdb) ptype E1
No symbol "E1" in current context.
(gdb) ptype E2
type = class E2 : public E0 {
}
(gdb) print ge2
$3 = {<> = {<No data fields>}, <No data fields>}
Note the bad output for ptype E0 and ptype E1. The output for "ptype E2" is okay. The output for "print ge2" has an incorrect empty basename, "<>" should be "<E0>".
gcc used to emit debug info for synthetic methods even if they weren't generated, so that even an empty class had some members. Now an empty class is truly empty and gdb gets a little confused. This change happened in gcc HEAD some time between 2004-07-15 and 2004-07-31.
See the typescript for a full session and the source code.
|
| File Attachments: |
|
| How-To-Repeat: |
I'm turning this into a test script, gdb.cp/empty.exp, so run empty.exp with gcc HEAD.
|
| Fix: |
|
| Release-Note: |
|
| Unformatted: |
|