From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 21 21:50:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF3A4106567F for ; Thu, 21 Aug 2008 21:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AA8968FC26 for ; Thu, 21 Aug 2008 21:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7LLo1Ea089189 for ; Thu, 21 Aug 2008 21:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7LLo1jc089188; Thu, 21 Aug 2008 21:50:01 GMT (envelope-from gnats) Resent-Date: Thu, 21 Aug 2008 21:50:01 GMT Resent-Message-Id: <200808212150.m7LLo1jc089188@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Pippijn van Steenhoven Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A69DD106566B for ; Thu, 21 Aug 2008 21:44:18 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 90D688FC08 for ; Thu, 21 Aug 2008 21:44:18 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m7LLiI6j002191 for ; Thu, 21 Aug 2008 21:44:18 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m7LLiIkF002190; Thu, 21 Aug 2008 21:44:18 GMT (envelope-from nobody) Message-Id: <200808212144.m7LLiIkF002190@www.freebsd.org> Date: Thu, 21 Aug 2008 21:44:18 GMT From: Pippijn van Steenhoven To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/126721: Compiling, assembling and linking code with debugging results in unusable debug information X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 21:50:02 -0000 >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@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 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 to continue, or q to quit--- >Fix: >Release-Note: >Audit-Trail: >Unformatted: