misc/126721: Compiling, assembling and linking code with debugging results in unusable debug information

Pippijn van Steenhoven pip88nl at gmail.com
Thu Aug 21 21:50:02 UTC 2008


>Number:         126721
>Category:       misc
>Synopsis:       Compiling, assembling and linking code with debugging results in unusable debug information
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 21 21:50:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Pippijn van Steenhoven
>Release:        7.0-RELEASE-p2
>Organization:
Xinutec Research Labs
>Environment:
gryphus ~> uname -a
FreeBSD gryphus.example.net 7.0-RELEASE-p2 FreeBSD 7.0-RELEASE-p2 #0: Wed Jun 18 07:33:20 UTC 2008     root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

gryphus ~> gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]

gryphus ~> gdb -v
GNU gdb 6.1.1 [FreeBSD]
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 "i386-marcel-freebsd".
>Description:
gcc generates broken debugging information if the compiling and assembling step are split. This bug is absolutely critical, because I am currently fighting a bug in my code and can't resume my tracing. The bug only happens on freebsd.
>How-To-Repeat:
gryphus ~> cat test.cc
#include <cstdio>

int
main ()
{
  int volatile *vi = 0;
  std::printf ("%d\n", *vi);
  return 0;
}
gryphus ~> g++ -g -S test.cc -o test.s ; g++ -g -c test.s -o test.o ; g++ -g test.o -o test ; gdb ./test
GNU gdb 6.1.1 [FreeBSD]
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 "i386-marcel-freebsd"...Dwarf Error: Could not find abbrev number 46 [in module /crypt/home/pippijn/test]

(gdb) r
Starting program: /crypt/home/pippijn/test 
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x080484cb in ?? ()
(gdb) bt
#0  0x080484cb in ?? ()
#1  0x00000000 in ?? ()
#2  0x28286da0 in __tsd_lock () from /lib/libc.so.7
#3  0xbfbfec28 in ?? ()
#4  0x00000001 in ?? ()
#5  0xbfbfec68 in ?? ()
#6  0x00000000 in ?? ()
#7  0xbfbfec38 in ?? ()
#8  0x28245a19 in atexit () from /lib/libc.so.7
#9  0x08048439 in ?? ()
#10 0x00000000 in ?? ()
#11 0x00000000 in ?? ()
#12 0xbfbfec58 in ?? ()
#13 0x08048439 in ?? ()
#14 0x00000001 in ?? ()
#15 0xbfbfec60 in ?? ()
#16 0xbfbfec68 in ?? ()
#17 0x00000000 in ?? ()
#18 0xbfbfec40 in ?? ()
#19 0xbfbfec5c in ?? ()
#20 0x00000000 in ?? ()
#21 0x00000001 in ?? ()
#22 0xbfbfed50 in ?? ()
#23 0x00000000 in ?? ()
#24 0xbfbfed69 in ?? ()
#25 0xbfbfed75 in ?? ()
#26 0xbfbfed7e in ?? ()
#27 0xbfbfed8b in ?? ()
#28 0xbfbfed9b in ?? ()
#29 0xbfbfedae in ?? ()
#30 0xbfbfedc5 in ?? ()
#31 0xbfbfee33 in ?? ()
#32 0xbfbfee3d in ?? ()
#33 0xbfbfee53 in ?? ()
#34 0xbfbfee68 in ?? ()
---Type <return> to continue, or q <return> to quit---
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list