History log of /external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6292bbbc3f678648fb5a1ec8222d33f6a5bb992a 02-Mar-2016 Christopher Ferris <cferris@google.com> Ignore compressed sections on local unwinds.

When doing local unwinds, attempts to work on compressed sections is
not necessary since this is only called from ART. ART already dumps the
java stacks and that's the only compressed sections that will be used.

It turns out that trying to process the compressed section in local unwinds
can cause problems since the uncompressed section can be large, which
means suddenly a lot more memory being consumed by the process. It also
takes extra time to complete the unwind, which can cause problems when
an ANR occurs, which might trigger a cascade of ANRs since the unwind
is so cpu intensive.

Bug: 27391690
Change-Id: I98be5754cc4de4071616db334dc0c9862d3a2504
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
344ee5841222c15cbc8a91e1f75e6f6f02d7d234 11-May-2015 David Srbecky <dsrbecky@google.com> Decompress debug symbols.

Debug symbols may be stored in LZMA compressed section .gnu_debugdata.

libunwind already contained some support for it however it was
disabled at compile time. This CL re-enables it and extends it.

The decompression code is based on LZMA SDK.

Change-Id: Ie199ce1fc31770940db288b5e57b50942f12be7b
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
66013410e88ae0014d4af305fbcc4993463095d1 05-Jan-2016 Christopher Ferris <cferris@google.com> Fix bad elf data handling.

When trying to find a debug frame:

- Any file was treated as an elf file without verification.
- The index into the section header was used without verifying it is
valid.

Both of these bugs are now fixed.

Bug: 26299490
Change-Id: Ib5ef710e6413e20243935e9451a0e0bb797894fc
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
0ba1110fb01ccd6fe32d255b8147d21cb2b40e15 23-Sep-2015 Christopher Ferris <cferris@google.com> Verify section table name size before strcmp.

If an elf file has a malformed section names, skip processing of the name.
Also, verify the return value of the allocations.

Bug: 24279745
Change-Id: Ic51bd9df7142bc599dc51bfdcab87ff20fe8a389
(cherry picked from commit 834ed932095aec986a8a86ba542fd19b12151aca)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
b5ae16cf71b577df7462e499b6c6ce2729fc50a3 21-May-2015 David Srbecky <dsrbecky@google.com> Enable .debug_frame support on all platforms.

Since dex2oat will be producing .debug_frame by default,
make sure we support it in libunwind.

Change-Id: I06dcbc9258939c1b152aba285d346ffbb2a14fed
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
bb754471703e806d83d0e6670955dc1d399690b3 10-Apr-2014 Christopher Ferris <cferris@google.com> Use map cache for finding image names.

This change removes the function find_binary_for_address and replaces it
with a call to check the cached map data instead. This is an error path
that hardly ever gets exercised though.

Also fix a couple of warnings in Gfind_proc_info-lsb.c.

Change-Id: Idb501d6674cacfc693fc35608d322ec78f48a4d6
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
d3bf49b06c7d56b371fe49f13490f7e548a8455a 28-Jan-2014 Christopher Ferris <cferris@google.com> Fix memory leak.

Change-Id: Iaf279d86fe1a9384bbc7cfa40e7b1783bb59a223
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
7d46a21e0a2cb561e4cad57b101a7137e01023dc 14-Nov-2013 Christopher Ferris <cferris@google.com> For current process, check memory accesses.

When attempting to unwind the current process, the library simple reads and
writes to memory for memory accesses. Unfortunately, if an unwind winds up
with invalid data, then the process can segfault. Add a guard to all memory
accesses that verifies that reads/writes are valid before attempting them.

For now, this guard is a nop on all systems except linux systems.

Also, modify the adjust_ip function to use the access_mem function
so that all reads go through the right function.

Bug: 11652982
Change-Id: I9d1feacae585374f6bf1d899f8a006ec9ecb47c4
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
984761515e6aafe8f27d0fda1151e2f81e2832e0 15-Nov-2013 Christopher Ferris <cferris@google.com> Fix memory leaks in dwarf processing.

Add a missing free in debug_frame handling.

Fix leaks in locate_debug_info of the path variable.

Change-Id: I9fa6f02415768ac58489e1253459d72f7a549d04
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
cc6cc088ba4077f5b6cfa3931a1737b03fc0446e 16-Oct-2013 Christopher Ferris <cferris@google.com> Add a new option to conserve stack space.

There are a few places where large data structures are put on the stack.
This causes failures when trying to dump threads using a smaller stack so
use an option to conserve stack space.

Tested by running these commands:

autoreconf -i
./configure

Verify that config.h has CONSERVE_STACK undefined since this is a host build.

autoreconf -i
android/conf_arm.sh

Verify that config.h has CONSERVE_STACK defined.

Built libunwind with both CONSERVE_STACK define and undefined.

Bug: 8410085
Change-Id: I9ec4dee656475650883176d8801430b7e312153c
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
eac65dc9b8cc18fa4c65c0485878a11c470357b6 15-Apr-2013 Matt Fischer <matt.fischer@garmin.com> Add basic support for the QNX operating system

This change adds some special cases to allow libunwind to compile
for QNX.

* QNX's copy of <elf.h> and <link.h> reside in sys/ instead. To deal
with this, an AC_CHECK_HEADERS() was added to check for the files
in both locations.
* Similarly, QNX does not have <endian.h>. In cases where the file is
not found, logic was added to refer to QNX-specific macros to determine
endianness.
* The QCC compiler, which is a wrapper around GCC, cannot handle some
standard GCC options. Therefore, logic was added to check for QCC,
and when it is found, to suppress the use of -lgcc, and to express the
option -nostartfiles as -Wc,-nostartfiles instead, which is correctly
passed on to the underlying GCC.
* Finally, the support file os-qnx.c was added, patterned after the existing
os-*.c files. Only local image lookup is currently supported (see the
comments for more information), but this is sufficient for QNX, since
ptrace is not supported there anyway, and that is the only case where the
function is required to do remote image lookup.

Change-Id: Ie7934f94a7317bdde59335f2acd4c3a97c0384c1
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
890e23eb9d3ffd9be2a025189a21794b5ed0e0ff 21-Sep-2012 Tommi Rantala <tt.rantala@gmail.com> Prefer NULL over zero
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
fce25d74c93e897439e5183fea7d8dbaf55848fe 27-Aug-2012 Tommi Rantala <tt.rantala@gmail.com> Eliminate one heap allocation in dwarf_find_debug_frame()

Allocate `tab' from stack in dwarf_find_debug_frame(), as it's only a
few members and we only need it locally in the function.
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
90d7baea352631f93ec7a9688fc59f58f148c19d 27-Aug-2012 Tommi Rantala <tt.rantala@gmail.com> Remove free() NULL pointer checks in load_debug_frame() error path

Just pass potentially NULL pointers to free() in the error path in
load_debug_frame(). Saved 40 bytes of code in libunwind.so on ARM -O2
thumb build at the expense of slightly slower execution.
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
43e5ee28c00813fb53f6642304b33a49b70b6d62 26-Mar-2012 Arun Sharma <asharma@fb.com> Demote the debug level to reduce verbosity
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
786882ff8c0d1317558a4a805b2be319e64cb6a9 12-Nov-2011 Arun Sharma <asharma@fb.com> Remove unused variable segbase
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
1e644990c9afe9054ba7693929139f298cb3e53a 31-Oct-2011 Ken Werner <ken.werner@linaro.org> Only declare the start/end variables in case CONFIG_DEBUG_FRAME is defined.

Prevents compiler warnings about unused variables.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
d20df8b3183d1f179ffc30a5ceabb9d1375ac0ff 01-Nov-2011 Arun Sharma <asharma@fb.com> Fix up the breakage when host != target
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
059676cb00cfdd3be17dfdeb25547037737f1b68 20-Oct-2011 Ken Werner <ken.werner@linaro.org> Prevent the use of struct dl_phdr_info outside of dl_iterate_phdr

Since the dl_iterate_phdr is required for local unwinding only the use of
struct dl_phdr_info can be eliminated in case libunwind gets compiled for
remote unwinding. This enhances libunwinds portability to targets that
don't provide any dl_iterate_phdr functionality.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
0fed502a81dd6d9eff4da9ff26d895a16ab828cf 20-Oct-2011 Ken Werner <ken.werner@linaro.org> UNW_REMOTE_ONLY fixes

Exclude <link.h> because it is only required for local unwinding when
iterating over the program headers.

Have the following DWARF related functions available in case of
UNW_REMOTE_ONLY because they are used by libunwind-ptrace:
dwarf_find_debug_frame
locate_debug_info
find_binary_for_address
load_debug_frame
debug_frame_tab_new
debug_frame_tab_append
debug_frame_tab_shrink
debug_frame_tab_compare

Signed-off-by: Ken Werner <ken.werner@linaro.org>
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
0b9f591823474c9651acdffec68256e077e4d601 12-Aug-2011 Ken Werner <ken.werner@linaro.org> Make the dwarf dl_iterate_phdr callback available within libunwind.

Rename the dwarf dl_iterate_phdr callback routine and the callback_data
structure to dwarf_callback and dwarf_callback_data. Make it available
within libunwind by declaring the two at the dwarf.h header file.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
46e10c5abeeb93345367a70db2af3aba4440a49e 27-May-2010 Arun Sharma <arun@sharma-home.net> Support .debug_frame based unwinding in _UPTi_find_unwind_table()

Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
546463d1e78d52197ff2c204f793c343abb97dc5 27-May-2010 Arun Sharma <arun@sharma-home.net> Factor out and export dwarf_find_debug_frame() function

Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
b115ab645a44071f0a51742f5804dbceebd3f1ac 15-May-2010 Arun Sharma <arun@sharma-home.net> Ignore separate debug files which contain a .gnu_debuglink section.

Current implementation fails to find separate debug symbols when
.gnu_debuglink is set to the same name of the target ELF basename
(e.g. "libc.so.6" for /lib/libc.so.6). This patch fixes this by ignoring
separate debug files that contain a .gnu_debuglink section.

It also fixes a small typo in a related Debug() line.

Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
250382c56d2c84fc3976cf8a4c834433bb68990d 20-Apr-2010 Lassi Tuura <lat@cern.ch> Use wider format when printing addresses in debug format.
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
491d576529a3b01208accb37627a075d7ce07093 16-Oct-2009 Arun Sharma <aruns@google.com> Fix compiler warnings on x86_64
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
b56375e76a0e23b6e464d994bc6a790e086b91db 07-Oct-2009 Paul Pluzhnikov <ppluzhnikov@google.com> Reduce stack use and apply CONFIG_DEBUG_FRAME to more code.

Currently, libunwind allocates several PATH_MAX entries on stack, while
trying to find a binary via /proc/.../maps.

However stack space may be at premium (especially when sigaltstack is used),
and PATH_MAX on Linux is 4096, while SIGSTKSZ is only 8192 on x86.

Attached patch eliminates multiple PATH_MAX stack allocations, and simplifies
code in maps_next, at the cost of being unable to do anything if we can't
mmap one page. It appears to me that under such low-memory conditions,
libunwind will fail shortly elsewhere anyway.

This patch also disables more of debug_frame-handling code when
CONFIG_DEBUG_FRAME is undefined.

Tested on Linux/x86_64 with and without CONFIG_DEBUG_FRAME, no regressions.
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
fc2934aadeff468b751113d56093429fd6bc4832 30-Sep-2009 Paul Pluzhnikov <ppluzhnikov@google.com> Make the remaining sigprocmask calls conditional on --enable-block-signals
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
9607c6407c3d0f8cff7b985f9f2b8aa96ffc00f6 18-Mar-2009 Arun Sharma <aruns@google.com> Fixup CONFIG_DEBUG_FRAME support.
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
a2c27a4ab724cf129cf956df4c6fb779bd2f5366 17-Mar-2009 Arun Sharma <aruns@google.com> Make .debug_frame support optional.

Because these code paths use malloc and stdio, they could
cause deadlocks when we try to unwind stack from inside malloc.
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
3842dac7333e42aa44531eda34ba55200b99ccf8 05-Feb-2008 Daniel Jacobowitz <drow@false.org> Add initial ARM and MIPS support. To support this, also enable the
reading of .debug_frame sections (used in lieu of .eh_frame sections
when they're not available).
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
03ba50ccaadbf962e9865d60e2171dc8e52ee24e 20-May-2005 hp.com!davidm <hp.com!davidm> Don't include <stdlib.h> and <string.h>.
Include "libunwind_i.h" instead of "tdep.h".

(Logical change 1.294)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
1f5ac0f5bd569a99e29b2de36f5600107503399e 03-May-2005 mostang.com!davidm <mostang.com!davidm> Adjust for sigset_t to intrmask_t renaming.

2004/11/17 02:43:39-08:00 mostang.com!davidm
(struct callback_data): New structure.
(linear_search): New function.
(callback): Convert to getting auxiliary info passed via a pointer to
a callback_data structure, rather than an unw_dyn_info_t
structure.
Keep track of the maximum load address in max_load_addr.
If an object doesn't have a binary search-table, fall back
on a linear search.
(dwarf_find_proc_info): Fill in callback-data structure before calling
dl_iterate_phdr(). Upon returning, check whether
cb_data.single_fde is set and, if so, return directly, without
searching the DWARF unwind-table.
(dwarf_search_unwind_table): Adjust for renaming of
dwarf_parse_fde() to dwarf_extract_proc_info_from_fde().
If IP doesn't fall into the IP-range of the FDE-entry found
by the search, return UNW_ENOINFO.

(Logical change 1.290)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
271f7069440b03152a957b5a79abb12e5f2bd605 24-Aug-2004 com[davidm]!marky <com[davidm]!marky> dwarf: fix local & remote table lookup

(Logical change 1.256)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
e9045e3cca8cbffbb449bf544bea7263b4701b47 19-Aug-2004 homeip.net!davidm <homeip.net!davidm> Add include of dwarf_i.h now that we need dwarf_reads32().
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)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
8241bb15a8ae2484d05238176284c5bed56eed24 05-May-2004 mostang.com!davidm <mostang.com!davidm> (struct table_entry): Move declrataion outside of !UNW_REMOTE_ONLY
bracket so the file compiles for UNW_REMOTE_ONLY, too.

(Logical change 1.224)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
d3fad3af128215bbf3b39b289ff396a2126a12b1 01-Apr-2004 mostang.com!davidm <mostang.com!davidm> (dwarf_find_proc_info): Mask signal-delivery during dl_iterate_phdr().

(Logical change 1.203)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
21595821bfe3b1a5b353d92104b14812242c58be 30-Jan-2004 hp.com!davidm <hp.com!davidm> (dwarf_search_unwind_table): Declare as PROTECTED, not HIDDEN.

(Logical change 1.162)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
eb51b4294aa18ab13c9496378abb25162688235b 20-Dec-2003 hp.com!davidm <hp.com!davidm> (Logical change 1.145)
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c
0bbb2fab680da4bb6ab8f3cfc46ab595c6a94118 20-Dec-2003 hp.com!davidm <hp.com!davidm> Initial revision
/external/libunwind/src/dwarf/Gfind_proc_info-lsb.c