public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org, rearnsha@arm.com, dan@codesourcery.com
Subject: Re: [rfc/rfa] Use ARM exception tables as GDB unwinder
Date: Wed, 20 Oct 2010 11:14:00 -0000	[thread overview]
Message-ID: <1287573257.3073.26.camel@e102319-lin.cambridge.arm.com> (raw)
In-Reply-To: <201010200000.o9K00u7j016909@d12av02.megacenter.de.ibm.com>

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

  reply	other threads:[~2010-10-20 11:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  0:01 Ulrich Weigand
2010-10-20 11:14 ` Matthew Gretton-Dann [this message]
2010-10-21 15:39   ` Ulrich Weigand
2010-10-20 13:27 ` Daniel Jacobowitz
2010-10-21 15:51   ` Ulrich Weigand
2010-10-21 16:02     ` Daniel Jacobowitz
2010-10-21 18:26       ` Ulrich Weigand
2010-10-21 18:42         ` Daniel Jacobowitz
2010-10-21 20:29           ` Ulrich Weigand
2010-10-21 20:43             ` Daniel Jacobowitz
2010-12-01 16:45               ` Ulrich Weigand
2010-12-12  4:21                 ` Daniel Jacobowitz
2010-12-12 12:24                   ` Andreas Schwab
2011-03-09 19:11                   ` Ulrich Weigand
2011-03-11 22:35                     ` Daniel Jacobowitz
2011-03-19  4:25                       ` Ulrich Weigand
2011-03-21 14:51                         ` Daniel Jacobowitz
2011-03-21 20:06                           ` Ulrich Weigand
2010-10-21 22:26       ` Ulrich Weigand
2010-10-26 13:43         ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287573257.3073.26.camel@e102319-lin.cambridge.arm.com \
    --to=matthew.gretton-dann@arm.com \
    --cc=dan@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=rearnsha@arm.com \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).