From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 766 invoked by alias); 9 Aug 2012 08:42:39 -0000 Received: (qmail 742 invoked by uid 22791); 9 Aug 2012 08:42:38 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Aug 2012 08:42:27 +0000 From: "jan.kratochvil at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug corefiles/11608] gcore does not support build-id Date: Thu, 09 Aug 2012 08:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: corefiles X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 7.1 X-Bugzilla-Changed-Fields: CC Version Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q3/txt/msg00190.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=11608 Jan Kratochvil changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jan.kratochvil at redhat | |dot com Version|unknown |7.5 --- Comment #1 from Jan Kratochvil 2012-08-09 08:41:34 UTC --- In practice it works now although it depends on something accidentally happening in Linux kernel: echo 'const int i[2000]={0};void _start(void){}'|gcc -Wall -nostdlib -fno-asynchronous-unwind-tables -Wl,--build-id -x c -;gdb -nx ./a.out -ex 'b *_start' -ex r -ex 'gcore core' -ex 'set confirm no' -ex q;eu-unstrip -n --core=core [...] 0x400000+0x400000 2fb48d92cfa19eb24524f14211565853e3da3deb@0x400284 - - [exe] It works since: http://sourceware.org/ml/gdb-patches/2012-08/msg00225.html But it is more accidental: $ cat /proc/22440/smaps 00400000-00401000 r-xp 00000000 fd:02 15079087 /home/jkratoch/t/a.out Shared_Dirty: 0 kB Private_Dirty: 4 kB Anonymous: 4 kB Swap: 0 kB Despite it is r-x Linux kernel had to write there some data - see Private_Dirty and Anonymous. I do not know why, Linux kernel hackers could advice. gcc (GCC) 4.7.2 20120809 (prerelease) GNU gdb (GDB) 7.5.50.20120809-cvs binutils-2.22.52.0.4-8.fc18.x86_64 kernel-3.4.6-1.fc16.x86_64 The right fix would be to see the '[exe]' line even with gdb-7.5 or earlier (not FSF GDB HEAD where is committed the patch for PR 11804 above). Earlier GDBs did not pay attention to the 4 lines in smaps and thus they did not dump the build-id page so that the '[exe]' line was not visible. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.