1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-30 21:21:45 +02:00
Commit graph

15 commits

Author SHA1 Message Date
Dave Watson a1437a3d27 Remove PROTECTED visibility
This only works on bfd ld, not lld or gold.
2017-12-28 08:26:42 -08:00
Dave Watson 54a970079d elf: Follow .gnu_debuglink when resolving function names
Centralize gnu_debuglink logic in elfxx.  Remove previous duplicated logic
from Gfind_proc_info and os-linux.

Logic is roughly the same as previous load_debug_frame, but uses VLAs
instead of malloc.
2017-03-02 08:02:14 -08:00
Konstantin Belousov 9e97c9b17a dwarf: Make binary path calculation os-specific.
/proc/self/exe only works on Linux, move path computation to os-* files
2017-01-19 10:07:13 -08:00
Martin Dorey 1f4929c05d linux: Add /usr/lib/debug symbol path checking
Debian likes to hive off symbol information to separate -dbg packages,
installing the debug information in a parallel tree rooted at /usr/lib/debug.
libunwind doesn't know how to find these files but it's easy, per the tested,
attached patch, to make it so. I don't see /usr/lib/debug at
http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGANDPA
but
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Debugging_with_gdb/separate-debug-files.html
says it's not just Debian and hints it might be driven by gdb. I do see mention
of /usr/lib/debug in libunwind already, but only in a DWARF-specific part of
the code.  A minor concern might be checking errno to see if the problem is
ENOENT before trying the alternate path. That might be better than flogging a
mmap problem or being out of file handles or whatever.
2017-01-13 08:36:37 -08:00
Arun Sharma 781d5d5263 One time whitespace fixup.
for f in $(find src include -name '*.[ch]'); do
  expand -t 8 $f > $tmp; mv $tmp $f;
done
2014-09-27 09:47:23 -07:00
Ken Werner 7f41e701e3 Have tdep_get_elf_image available in case of UNW_REMOTE_ONLY
Because it gets used by libunwind-ptrace.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-10-15 23:10:28 -07:00
Arun Sharma 1787a2fd28 Add path and pathlen arguments to tdep_get_elf_image()
Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
2010-05-15 12:14:09 -07:00
Paul Pluzhnikov b56375e76a 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.
2009-10-07 12:51:03 -07:00
hp.com!davidm 07b01ad205 Include "libunwind_i.h" instead of "tdep.h" and "internal.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
mostang.com!davidm df77cf1ad7 (tdep_get_elf_image): Pass sizeof buffer to maps_next().
(Logical change 1.199)
2004-03-31 07:38:06 +00:00
hp.com!davidm c4f5974dd1 Declare libunwind-entry-points as PROTECTED to ensure local uses get
resolved within the library itself.

(Logical change 1.151)
2004-01-03 10:50:24 +00:00
hp.com!davidm c974464933 Delete include of elf64.h. The "tdep.h" header-file is responsible
for including the appropriate file.

(Logical change 1.130)
2003-11-27 06:52:54 +00:00
mostang.com!davidm d098282ff5 Include "tdep.h".
(Logical change 1.59)
2003-03-06 06:14:36 +00:00
mostang.com!davidm 824d6619b5 (Logical change 1.45) 2003-02-08 10:10:59 +00:00
mostang.com!davidm 5f94e2d488 Initial revision 2003-02-08 10:10:59 +00:00