From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10498 invoked by alias); 20 Oct 2010 11:14:39 -0000 Received: (qmail 10485 invoked by uid 22791); 20 Oct 2010 11:14:38 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,TW_IB,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (217.140.96.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Oct 2010 11:14:28 +0000 Received: from cam-owa2.Emea.Arm.com (cam-owa2.emea.arm.com [10.1.105.18]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id o9KBA5F9020984; Wed, 20 Oct 2010 12:10:05 +0100 (BST) Received: from [10.1.77.49] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 20 Oct 2010 12:14:17 +0100 Subject: Re: [rfc/rfa] Use ARM exception tables as GDB unwinder From: Matthew Gretton-Dann To: Ulrich Weigand Cc: gdb-patches@sourceware.org, rearnsha@arm.com, dan@codesourcery.com In-Reply-To: <201010200000.o9K00u7j016909@d12av02.megacenter.de.ibm.com> References: <201010200000.o9K00u7j016909@d12av02.megacenter.de.ibm.com> Content-Type: text/plain; charset="ISO-8859-1" Date: Wed, 20 Oct 2010 11:14:00 -0000 Message-ID: <1287573257.3073.26.camel@e102319-lin.cambridge.arm.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00316.txt.bz2 Ulrich, Firstly an apology - I'm not going to be able to look at this in detail for a while, and Richard Earnshaw is away as well for a couple of weeks. However, I do have one quick question: On Wed, 2010-10-20 at 02:00 +0200, Ulrich Weigand wrote: > In addition, one minor change was necessary to the prologue unwinder: > the this_id routine no longer uses get_frame_func to retrieve the > function start address; instead, this value is stored in the cache. > This allows the exception unwinder to provide this information from > the exception table, instead of having to rely on symbol data. One of the 'optimisations' that can be applied to the exception unwind table is that if two contiguous functions have the same unwind tables they can be merged. So for instance: int foo (int x, int y) { return x + y + 1; } int bar (int x, int y) { return x + y + 2; } Both functions have the same unwind table entry, and so the linker may merge the entries. So when actually in 'bar' a naive lookup of the function you are in using the start address of the exception table entry would incorrectly say you are in 'foo'. The libjava developers came across this earlier in the year when ld started applying this optimisation (see: http://sourceware.org/ml/binutils/2010-04/msg00193.html). Can the change you detail above handle this? Thanks, Matt -- Matthew Gretton-Dann Principal Engineer - PDSW Tools ARM Ltd