This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc/rfa] Use ARM exception tables as GDB unwinder


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:

Can the change you detail above handle this?



Matthew Gretton-Dann
Principal Engineer - PDSW Tools

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]