From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28575 invoked by alias); 30 Jul 2012 16:10:40 -0000 Received: (qmail 28563 invoked by uid 22791); 30 Jul 2012 16:10:39 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Jul 2012 16:10:13 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6UGA7tC014393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Jul 2012 12:10:08 -0400 Received: from zebedee.pink (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6UGA5We028973; Mon, 30 Jul 2012 12:10:05 -0400 Message-ID: <5016B1DC.9030704@redhat.com> Date: Mon, 30 Jul 2012 16:21:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Julian Brown CC: gcc-patches@gcc.gnu.org, mark@codesourcery.com, drow@false.org Subject: Re: [PATCH, ARM] RFC: Backtracing through C++ exception-handling constructs References: <20120730151840.0bf5eb81@octopus> In-Reply-To: <20120730151840.0bf5eb81@octopus> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-07/txt/msg01503.txt.bz2 On 07/30/2012 03:18 PM, Julian Brown wrote: > There are two issues in play here: > > 1. Exception-handling is handled in a target-specific way for ARM, > defined in the EHABI document ("Exception handling ABI for the ARM > architecture", IHI 0038A). However, no mention of "forced unwinding" is > made in this document. > > 2. Backtracing in particular isn't even the "normal" use case for > forced unwinding: e.g., > > http://www.ucw.cz/~hubicka/papers/abi/node25.html#SECTION00923200000000000000 > > suggests that forced unwinding is "a single-phase process (phase 2 of > the normal exception-handling process)", whereas for producing a > backtrace, something more like a phase 1 lookup is done (no cleanup > handlers are called -- we're merely observing the state of the stack). That's right. I wrote that code. I think I didn't realize that forced unwinding was a single-phase process. It looks to me like checking for _US_VIRTUAL_UNWIND_FRAME and _US_FORCE_UNWIND, as you have done, is right. Andrew. P.S. The ARM unwinder data was never intended for all the things we do with it, and it's pretty much a matter of luck that it works. I don't really know why we didn't adopt DWARF unwinder data for ARM, given that the ARM unwinder data is really only intended for exceptions, and we need a lot more.