This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/1510: <incomplete type> when printing nested typedef enum in Linux/g++/C++
- From: bjacob at ca dot metsci dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 14 Jan 2004 17:45:51 -0000
- Subject: gdb/1510: <incomplete type> when printing nested typedef enum in Linux/g++/C++
- Reply-to: bjacob at ca dot metsci dot com
>Number: 1510
>Category: gdb
>Synopsis: <incomplete type> when printing nested typedef enum in Linux/g++/C++
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 14 17:48:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Jacob Burckhardt
>Release: GNU gdb 2004-01-14-cvs
>Organization:
>Environment:
gdb and the test program were both compiled with gcc 2.96 and Linux sumatra.ca.metsci.com 2.4.18-17.7.xsmp #1 SMP Tue Oct 8 12:37:04 EDT 2002 i686 unknown
i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1
>Description:
When I tell gdb to print the variable, it says <incomplete type>. I
believe that I have given gdb complete information about the type since
I compiled all of the source code with -g.
I expected it to print a number instead of <incomplete type>.
>How-To-Repeat:
struct blob {
typedef enum {} alias;
};
int main() {
blob::alias variable;
}
~ sumatra 47 jb % g++ -g d.C
~ sumatra 48 jb % /disk/tmp/bjacob/gdb_cvs/src/gdb/gdb a.out
GNU gdb 2004-01-14-cvs
Copyright 2004 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"...Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x80484d6: file d.C, line 7.
(gdb) run
Starting program: /home/bjacob/a.out
Breakpoint 1, main () at d.C:7
7 }
(gdb) p variable
$1 = <incomplete type>
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: