From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7669 invoked by alias); 28 Apr 2009 19:52:20 -0000 Received: (qmail 7661 invoked by uid 22791); 28 Apr 2009 19:52:20 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Apr 2009 19:52:14 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3SJpRZU007890; Tue, 28 Apr 2009 15:51:27 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3SJpQwJ020545; Tue, 28 Apr 2009 15:51:27 -0400 Received: from [10.32.10.108] (vpn-10-108.str.redhat.com [10.32.10.108]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3SJpPtM015963; Tue, 28 Apr 2009 15:51:25 -0400 Subject: Re: [Query] Re: dwarf unwinder (only works on i386/x86_64) From: Mark Wielaard To: Roland McGrath Cc: Prerna Saxena , systemtap@sourceware.org In-Reply-To: <20090428181720.4CBECFC3C6@magilla.sf.frob.com> References: <1239977157.2336.33.camel@fedora.wildebeest.org> <49F74546.8040206@linux.vnet.ibm.com> <20090428181720.4CBECFC3C6@magilla.sf.frob.com> Content-Type: text/plain Date: Tue, 28 Apr 2009 19:52:00 -0000 Message-Id: <1240948283.3822.13.camel@hermans.wildebeest.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00466.txt.bz2 Hi, Roland already answered most of the questions. Some time ago I wrote some high level overview of all the moving pieces related to unwinding. Maybe someone finds that useful: A while ago I tried to summarize some of these issues: http://gnu.wildebeest.org/diary/2007/08/23/stack-unwinding/ On Tue, 2009-04-28 at 11:17 -0700, Roland McGrath wrote: > > ii. This section seemingly appears to be a better bet than DWARF to base > > the unwinder on--- because a ".debug_frame" based unwinder might not be > > useful in case of a kernel complied without debuginfo. > > It is a somewhat hairy subject. But in short, this is not so in current > kernels. That is not entirely apropos, because it's only the situation for > the kernel, and there are also user binaries to consider. There it is an > even more complex subject. The overall answer is that the answer is complex, > but potentially both sections are involved. The original choice for using debug_frame was because it was always available (since we required debuginfo already) and it was complete. GCC 4.4 changed this though (and the uprobes_ustack.exp test does indeed fail when build with gcc 4.4). With that version .debug_frame is no longer complete, if unwind data is emitted into .eh_frame, it is not emitted into .debug_frame (so no duplication) and only when .eh_frame is not emitted, .debug_frame is emitted. So we have to start doing something more clever. Defaulting to .eh_frame (at least for user space) might be a good idea, and maybe then combining the two tables (and maybe creating our own search table). .eh_frame and .debug_frame are encoded slightly differently, but supporting both is not hard. Cheers, Mark