remote_lookup() may return the wrong table entry or an invalid entry
combining the start address from one entry with the fde_offset from
another. The similar search in lookup() finds the correct entry, but
may perform unnecessary comparisons to get there. Also fix the
prototype of remote_lookup().
Signed-off-by: Mark F Young <marky@model.com>
Signed-off-by: David Mosberger <davidm@hpl.hp.com>
BKrev: 412af9f4qbo3tgB2jDrMsp8-ODj9iA
in the right order. This should fix a problem where the wrong library
was picked up if an old libunwind was installed already. Reported
by HJ Lu.
BKrev: 4125dff9XwKbhk-7KOb0sPYHpZHbAA
from lib_LTLIBRARIES_cdep to here.
(libunwind_la_SOURCES_x86_64_common): Mention x86_64/ucontext_i.h so
it gets included in the tar-ball, too.
(lib_LTLIBRARIES): List $(lib_LTLIBRARIES_cdep_setjmp) after the
other libraries.
(Logical change 1.254)
to work. Also, bt works now correctly, except that it still
crashes when attempting to unwind across a signal-handler on
an alternate signal-stack.
BKrev: 4125df2334Is8GIamgpMJ-630S9EBw
printing them. Avoids compiler-warning for 64-bit targets.
(apply_reg_state): Handle the special case where the stack-pointer
plays the role of the CFA and the stack-pointer hasn't
been saved. This is based on a patch by Max Asbock.
(Logical change 1.253)
In theory, this may not be needed. In practice, I find that
Red Hat Enterprise Linux AS release 3, the _start() routine has
no unwind-info, but we need to be able to unwind into this
routine to find the end-of-frame-chain marker (RBP == 0).
(Logical change 1.253)
Drop DWARF-parsing debug prints from level 16 to 15.
(struct table_entry): Change member types from unw_word_t to int32_t. The members
need to be of a signed type and forcing them to 32 bits makes the type
work for both 32-bit and 64-bit executables (up to 4GB of text-size).
(callback): Only allow search tables which have 32-bit members.
Fix initialization of di->u.rti.table_len to express table-length as a count
of unw_word_t, as it's defined to be (we get lucky here: even with 32-bit
members, each table-entry contains two members so we're guaranteed that the
table has a size that is an integer-multiple of unw_word_t even on 64-bit
platforms).
(lookup): Change type of "rel_ip" from unw_word_t to int32_t. Simplify the
code a bit.
(remote_read): Delete.
(remote_lookup): Use dwarf_reads32() instead of remote_read() to read out table
members. Simplify code a bit.
(Logical change 1.248)