libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] unwinding through dynamically modified code?


From: Todd L Miller
Subject: Re: [libunwind] unwinding through dynamically modified code?
Date: Fri, 26 Mar 2004 16:35:42 -0600 (CST)

> Yup.  It sounds like a generally useful improvement.  If it works,
> please let me know.

        Libunwind now reads the state for the correct IP.  However, the
decoder _stops_ decoding as soon as it sees an ALIAS operation, assuming,
apparently, that all ALIASes are identical code, rather than identical
state.  I've hacked in a correction for this as follows: when
parse_dynamic() encounters an ALIAS, it does not return directly from the
call create_state_record_for().  Instead, it switches the state record's
when_target back to what it used to be (create_state_record_for()  sets it
appropriately for the aliased state/code), sets sr->done to 0 (because
decoding for the aliased state/code did finish), and then sets the 'when'
on the RP (sr->curr.reg[IA64_REG_IP].when) to the 'when' of the ALIAS.
Otherwise, when parse_dynamic() returns to create_state_record_for(), it
can think that the RP hasn't been set, because the correct when value in
the aliased code can be quite a bit further along then the ip in the
referencing code.  (I would guess that _all_ sr->curr.reg[*].when should
be set to the when of the ALIAS, because that's really what I'm saying
with (this type of) ALIAS.)

        While this works, it's rather ugly.  I'd like suggestions on
beautifying it. :)  (I can send the patch along if it's helpful.)

- Todd Miller


reply via email to

[Prev in Thread] Current Thread [Next in Thread]