From Bugzilla Helper: User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.5-15 i586) gdb gets lost reading dwarf2 info for a shared library, quits early, and does not see most of the symbol information, leaving the user nearly helpless. Reproducible: Always Steps to Reproduce: 1. compile and link shared library 2. invoke gdb 3. I will Attach the linked .so (42KB) and C++ source file (26KB) and shell script to this Bug, as soon as the Bug number is reported to me. Actual Results: $ ./Bar.sh Bar.cc:817: warning: `class Class1::Class000000000033' only defines private constructors and has no friends Bar.cc:605: warning: `char s00000000000000327[84]' defined but not used Bar.cc:886: warning: `char s0042[82]' defined but not used GNU gdb 5.0 Copyright 2000 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 "ia64-redhat-linux"...Dwarf Error: Could not find abbrev number 14672. (gdb) q Expected Results: No complaint from gdb. $ rpm -q -f /usr/bin/gdb ## also fails with gdb from rawhide-3 gdb-5.0-13 $ rpm -q -f /usr/bin/ld gnupro-1117-6 $ type g++ g++ is /usr/bin/g++ $ rpm -q -f /usr/bin/g++ gnupro-1117-6 gcc-c++-2.96-76 $ cat /etc/redhat-release Red Hat Linux release 7.0.90 (Fisher) newruntime>uname -a Linux angus 2.4.0-0.99.11smp #1 SMP Wed Jan 24 13:38:34 EST 2001 ia64 unknown
Created attachment 13404 [details] shell script to invoke g++ compiler, linker, and gdb
Created attachment 13405 [details] shared lib that gdb cannot read dwarf2
Created attachment 13406 [details] C++ source for shared lib
Any chance of trying a newer gdb, eg. the newest daily snapshot in ftp://sources.redhat.com/pub/gdb/snapshots ?
It still fails on today's snapshot: $GDB Bar.so GNU gdb 20010323 Copyright 2001 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 "ia64-unknown-linux"...Dwarf Error: Could not find abbrev number 14672. (gdb)
I've built gdb-5.0rh-6. You can find them in http://people.redhat.com/teg/gdb/ ? Can you give these a try, to see if they fix this problem on the IA64?
John no longer has access to the IA-64 system. My results using http://people.redhat.com/teg/gdb/gdb-5.0rh-6: no change in behaviour gdb Bar.so GNU gdb 5.0rh-6 Red Hat Linux 7.1 Copyright 2001 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 "ia64-redhat-linux"...Dwarf Error: Could not find abbrev number 14672. (gdb)
Should be fixed in gcc-2.96-82.