1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-09-29 18:09:29 +02:00
Commit graph

78 commits

Author SHA1 Message Date
Tommi Rantala
e891591bcb ppc32: fixup cross build failure 2012-09-21 22:52:28 -07:00
Arun Sharma
e4b24be9c2 pkg-config file fixups
Suggested-by: Alexander Toresson <alexander.toresson@gmail.com>
2012-09-21 22:46:01 -07:00
Alexander Toresson
ea5e90fd9f Create and install pkg-config .pc files
[Edit: renamed to libunwind-generic.pc and some .pc files
 created only when needed -- asharma@fb.com]
2012-09-15 11:34:43 -07:00
Cody P Schafer
9184535486 ptrace: add more Debug to access_reg
This was useful in debugging issues with the libunwind-ptrace code on
ppc64.
2012-09-15 10:50:32 -07:00
Cody P Schafer
3d6f7479b0 ptrace: check for NULL arg.
tdep_get_func_addr in ppc64 passes NULL for the last argument of
as->access_mem.  tdep_get_func_addr is called by elf_w(lookup_symbol),
which in turn is called by elf_w(get_proc_name_in_image).

elf_w(get_proc_name_in_image) is part of the API, and is only passed an
unw_addr_space_t, not a unw_cursor_t, meaning that we cannot recover the
UPT_info on the PPC64 platform.

This could be fixed by giving libunwind the knowledge to perform
relocations itself, thus not needing to look at the running image to
determine function addresses.
2012-09-15 10:47:43 -07:00
Cody P Schafer
10abb25af4 ptrace/access_reg: print out register name on "bad register"
When we have a "bad register", print out the name of that register (if
possible) to aid in debugging.
2012-09-15 10:47:43 -07:00
Cody P Schafer
64e8a3d909 UPT: Add reg offsets for ppc32/64 2012-09-15 10:47:42 -07:00
Martin Milata
d93d96ad83 Fix compilation on IA64
- Add tdep macro for {dwarf,ia64}_find_unwind_table so that ia64
   doesn't try to use dwarf code.
 - Fix extraneous #if.
 - Fix mistyped filename in Makefile.am.
 - Link ia64-specific tests with correct libraries.

Signed-off-by: Martin Milata <mmilata@redhat.com>
2012-05-23 20:52:28 -07:00
Arun Sharma
fa5409387c Merge branch 'coredump2' of https://github.com/adsharma/libunwind
Conflicts:
	src/ptrace/_UPT_find_proc_info.c
2012-05-23 20:51:50 -07:00
Arun Sharma
cbc66b62c0 mips: fix a linker error
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
2012-04-09 19:48:49 -07:00
Arun Sharma
6525714c27 Move some dwarf functionality from ptrace to dwarf
Move ptrace-independent code from src/ptrace/_UPT_find_proc_info.c
to src/dwarf/{G,L}find_unwind_table.c. Name this moved function
dwarf_find_unwind_table().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-03-12 20:06:37 -07:00
Arun Sharma
25ee9f8172 Introduce struct elf_dyn_info
This is a common part of struct UPT_info
and struct UCD_info (to be introduced later).
Make _UPTi_find_unwind_table function operate only on this part
of struct UPT_info.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-03-12 20:04:19 -07:00
Ken Werner
059676cb00 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>
2011-10-29 17:12:43 -07:00
Ken Werner
197571915c Change _UPTi_find_unwind_table to return an integer.
This keeps the definition on IA64 and all the other architectures in sync with
the declaration of _UPTi_find_unwind_table. This also mimics the behaviour of
what's done for local unwinding and allows the function to provide more than
one way to undwind.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-10-15 23:10:27 -07:00
Arun Sharma
962366dace Fixup compile errors on ia64.
Suggested-by: Harald Servat <harald.servat@bsc.es>
2011-09-23 11:11:34 -07:00
Ken Werner
d83846f120 ARM: Initial support for remote unwinding using libunwind-ptrace
Change _UPTi_find_unwind_table to also look for the ARM specific unwind
information. Adjust the ARM unwind code to read memory using the accessor
routines.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-08-15 20:12:54 +02:00
Ken Werner
b317cb4829 Change libunwind-ptrace to also look for .debug_frame if nothing found in .eh_frame.
This changes the behavior of libunwind-ptrace to what we do for local
unwinding.

Signed-off-by: Ken Werner <ken.werner@linaro.org>
2011-08-15 20:12:54 +02:00
Joel Brobecker
8d991d9258 Fix call to maps_next in _UPT_get_dyn_info_list_addr.c
A previous change reduced the number of arguments that this function
tasks, but one call at least did not get updated, resulting in a build
failure on ia64-linux.  This patch fixes it.
2011-06-18 19:50:31 -07:00
Joel Brobecker
e003e44a37 Check for <sys/ptrace.h> before including it
On ia64-hpux version 11.31, <sys/ptrace.h> has been removed.
This patch adds a configure check for this header file, and only
includes <sys/ptrace.h> if it exists.
2011-06-18 19:50:28 -07:00
Konstantin Belousov
b3757e7792 Restore the linking when --enable-debug-frame is not specified 2010-05-29 01:07:40 +03:00
Arun Sharma
46e10c5abe Support .debug_frame based unwinding in _UPTi_find_unwind_table()
Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
2010-05-26 19:25:41 -07:00
Arun Sharma
8ee7b1762e Add ip argument to _UPTi_find_unwind_table.
Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
2010-05-15 12:15:49 -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
Arun Sharma
66b7335ff3 Adds missing register offsets for ARM
Signed-off-by: Andris Zeila <andris.zeila@accenture.com>
2010-05-15 11:56:37 -07:00
Giuseppe Scrivano
a67654e86f [PATCH] Reduce scope of the eh_frame_end local variable 2010-04-14 12:11:29 -07:00
Konstantin Belousov
42bc15c72c Provide proper register offsets in the gregset for FreeBSD/i386 2010-04-11 19:18:07 +03:00
Konstantin Belousov
a688d6c4c9 Remove unused variable. 2010-04-10 18:51:17 +03:00
Konstantin Belousov
6f7b335e89 Add my copyrights to several files that contain essential modifications 2010-04-10 01:42:26 +03:00
Konstantin Belousov
9bb9c972e6 Merge with origin/master 2010-03-31 16:01:38 +03:00
Arun Sharma
6203f1cd0f Cleanup a mapped elf image.
Without this, we end up with mmap leaks. Thanks to Humberto Abdelnur
for suggesting this.
2010-03-26 15:54:14 -07:00
Konstantin Belousov
9f79621a29 Enough for now for ptrace backend 2010-03-08 20:55:50 +02:00
Konstantin Belousov
752ce15c4f Preliminary version of freebsd syscall unwinder 2010-03-08 19:45:54 +02:00
Konstantin Belousov
d7eea91448 Cast caddr_t argument for ptrace 2010-03-07 12:27:03 +02:00
Konstantin Belousov
78cb28b4a6 PT_CONTINUE. 2010-03-06 16:20:47 +02:00
Konstantin Belousov
d4a4ddd23d Provide access to the general regs on FreeBSD. 2010-03-06 16:17:21 +02:00
Konstantin Belousov
cf6ae3548f Code to read/write user memory on FreeBSD 2010-03-06 15:04:56 +02:00
Konstantin Belousov
d11456ffbf Code to read/write fpregs on FreeBSD 2010-03-06 14:55:11 +02:00
Konstantin Belousov
905034ce72 Initial attempt at the build infrastructure for FreeBSD. 2010-03-06 00:41:37 +02:00
Arun Sharma
6aec15799d Fix ppc32 build.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
2009-04-13 11:44:45 -07:00
Bruna Moreira
1eddefc371 [ARM] This patch add some missing bits on ARM platform.
* src/arm/unwind_i (arm_lock, arm_local_resume): Define.
 * src/ptrace/_UPT_find_proc_info.c: Handle ARM like X86 etc.
 * tests/flush-cache.S (flush_cache): Add (dummy) ARM-version.
	ARM does need executable stack, even on Linux...

Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
Signed-off-by: Bruna Moreira <bruna.moreira@indt.org.br>
2008-04-21 13:43:18 -06:00
Daniel Jacobowitz
3842dac733 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).
2008-02-04 17:16:37 -07:00
Jose Flavio Aguilar Paulino
4499bb29a6 [PPC32] First check-in to add preliminary support for Linux/PPC32. 2007-09-12 21:52:25 -06:00
Jose Flavio Aguilar Paulino
32e2187fab [PPC64] Get "make check" to work on PPC64 Linux. Add a README entry
describing the expected results.
2007-08-27 09:11:37 -06:00
David Mosberger-Tang
e6b9f350f7 Introduce a tdep_get_func_addr_hook() in the ELF lookup_symbol()
routine and add address-space argument.  This is needed because on
PPC64, a the function-name symbol refers to a function descriptor
(unlike, for example, on ia64, where the @fptr() operator is needed to
refer to a function descriptor).  Thus, in order to look up the name
of a function, we need to dereference the function descriptor.  To
make matters more "interesting", the function descriptors are normally
resolved by the dynamic linker, so we can't get their values from the
ELF file.  Instead, we have to read them from the running image, hence
the need for the address-space argument.
2007-08-22 13:02:09 -06:00
Jose Flavio Aguilar Paulino
b33021e4b2 Add PPC64 support. 2007-08-02 09:59:43 -06:00
David Mosberger-Tang
8c94e12429 (_UPT_find_proc_info): Fix potential crash due to uninitialized pointer.
Be sure to clear pi->unwind_info when looking up the kernel table and
not needing the unwind-info.  Otherwise, _UPT_put_unwind_info() may
erroneously call free() on the pointer, even though that space wasn't
malloc'd, leading to crashes..
2006-07-26 15:43:23 -06:00
hp.com!davidm
32385d36fd Include "tdep-ia64/rse.h" instead of "ia64/rse.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
hp.com!davidm
67f90c24be Include "libunwind_i.h" instead of "tdep.h".
Include "elfxx.c" instead of "elf64.c".

(Logical change 1.294)
2005-05-20 09:48:08 +00: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
10a269d6d0 Also enable DWARF code for UNW_TARGET_HPPA.
2004/11/23 16:59:56-08:00 mostang.com!davidm
(_UPTi_find_unwind_table): Implement first draft for x86/-64.

(Logical change 1.290)
2005-05-03 09:13:17 +00:00