Are enums known to be broken with dwarf2 on the amd64 target? google didn't help me, so thought I'd ask here.
Testcase: [scm8]$ cat en.c enum enumtype { ENUM_VALUE_ONE = 0x00000001 }; main () { printf ("%d\n", ENUM_VALUE_ONE ); } Problem: [scm8]$ gcc -gdwarf-2 en.c # same result as gcc -g [scm8]$ gdb -q a.out Using host libthread_db library "/lib64/tls/libthread_db.so.1". (gdb) p ENUM_VALUE_ONE No symbol "ENUM_VALUE_ONE" in current context. And with my own gdb 6.3: [scm8]$ ~/dl/gdb-6.3_amd64/gdb/gdb a.out GNU gdb 6.3 This GDB was configured as "x86_64-unknown-linux-gnu"...Using host libthread_db library "/lib64/tls/libthread_db.so.1". (gdb) p ENUM_VALUE_ONE No symbol "ENUM_VALUE_ONE" in current context. (gdb) q however [scm8]$ gcc -gstabs en.c [scm8]$ gdb -q a.out Using host libthread_db library "/lib64/tls/libthread_db.so.1". (gdb) p ENUM_VALUE_ONE $1 = ENUM_VALUE_ONE (gdb) p (int)ENUM_VALUE_ONE $2 = 1 Configuration: [scm8]$ cat /etc/issue Red Hat Enterprise Linux AS release 3 (Taroon Update 3) [scm8]$ gcc -v Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=x86_64-redhat-linux Thread model: posix gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42) [scm8]$ gdb --version GNU gdb Red Hat Linux (6.1post-1.20040607.17rh) This GDB was configured as "x86_64-redhat-linux-gnu". [scm8]$ rpm -qa | grep (gcc|gdb) gdb-6.1post-1.20040607.17 gcc-3.2.3-42 This problem was originally seen with gcc = gcc 3.4.2 cross compiling to amd64 from Linux (so it's not obviously due to a back-level compiler). _______________________________________________ Bug-gdb mailing list Bug-gdb@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gdb