summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Makefile.am: Add missing riscv header to noinstZhaofeng Li2021-08-271-1/+1
|
* Add optimization options in .travis.ymlkasperk812021-08-081-11/+30
|
* test-setjmp: Zero out all sigsetsJim Wilson2021-07-111-0/+4
| | | | | | Since glibc 2.32 [1], sigemptyset() no longer clears the entire sigset_t. [1] "signal: Use <sigsetops.h> for sigemptyset, sigfillset" (9f6bd1f6057e57cce9b07844c28f15859ab15d49)
* test-ptrace: Fix for NixOSZhaofeng Li2021-07-111-2/+2
| | | | In NixOS, coreutils aren't in their FHS-mandated locations.
* Ltest-mem-validate: Disable inlining for consume_and_runZhaofeng Li2021-07-111-4/+18
| | | | See #222 and #227. The tests are so fragile :(
* Include asm/ptrace.h in _UPT_reg_offset.cTBK2021-07-102-1/+5
|
* mips: fix regression after "Handle Gstep according the N64/N32 ABI"Sergey Korolev2021-07-061-2/+5
| | | | | | unw_step should return zero for _MIPS_SIM != _ABI64 when dwarf_step failed. This restores unw_step behaviour before 5eec9a2ecb9a93996d566bbfbcdbe006f64b7e16 for _ABIN32 and _ABIO32 interfaces.
* DWARF: handle out of memory errorsSergey Korolev2021-07-061-3/+23
|
* Don't force {exec_prefix}/lib64 libdir on ppc64Matthias Diener2021-07-061-6/+0
|
* Fix -mx32 compilation errorkasperk812021-07-061-1/+1
|
* Add port for Linux on RISC-V (riscv)Zhaofeng Li2021-07-0652-5/+2629
| | | | | This commit adds support for Linux on RISC-V. Only 64-bit is supported at the moment.
* Remove autogen.sh wrapperkasperk812021-06-302-10/+1
|
* Show contents of test-suite.log on test failurekasperk812021-06-301-0/+2
|
* x86_64/GTrace: Fix usage of unsaved registersDave Watson2021-06-291-4/+4
| | | | | | Some cfis may access registers that aren't saved on the trace path. Set all these registers to null locations, so that attempting to use them causes us to fall back to the slow path.
* Improve multiarch condition in coredump accesskasperk812021-06-291-1/+1
|
* Use the BUILD / HOST convention in .travis.ymlkasperk812021-06-291-16/+32
|
* Bump version to 1.6 in configurekasperk812021-06-292-3/+3
|
* Add missing case for IA64 in coredumpMike Frysinger2021-06-251-0/+3
| | | | | | https://bugs.gentoo.org/586092 this might not be correct, but at least it builds, and doesn't crash.
* Fix build failure on ia64Adrian Bunk2021-06-171-6/+5
| | | | | | | | | | coredump/_UPT_get_dyn_info_list_addr.c is almost identical to ptrace/_UPT_get_dyn_info_list_addr.c It's clearly an __ia64 implementation copy.
* Include extra ia64 files in dist packagekasperk812021-06-171-0/+3
|
* README: document ppc32 supportOvidiu Panait2021-05-241-0/+1
| | | | | PPC32 support was confirmed in #127, but this info was not added to the README. To make things clear, add ppc32 to the supported arch/os table.
* Fix `unw_tdep_context_t` for AArch64 Androidxtkoba2021-04-191-0/+8
|
* Fix `dl_iterate_phdr` wrapperxtkoba2021-04-191-2/+2
|
* typo: aligment -> alignmentSim Sun2021-03-151-3/+3
|
* Fixes for the s390x targetUlrich Weigand2021-03-155-9/+49
| | | | | | | | | | | | | | | | - Fix unwinding GPRs that were saved in FPRs Since DWARF_FPREG_LOC locations satisfy *both* DWARF_IS_REG_LOC and DWARF_IS_FP_LOC, code that has to distinguish between the two must check DWARF_IS_FP_LOC *first*. This fixes a failure in test-ptrace on Ubuntu 20.04. - Fix build using (older versions of) clang Use fully-qualified register names (%r15) in inline asm. Those work with all existing compilers. - Add missing s390x include in include/tdep/dwarf-config.h - Add s390x files to CMakeLists.txt to enable cmake build
* Port memory address checks from x86/x86_64 to Aarch64Mikhail Durnev2021-03-157-10/+291
| | | | Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
* Update configure.ac to prevent missing symbolsAlexandre Truong2021-03-151-0/+3
| | | | | | | | | | | | | | nm shows that those two symbols are undefined, it happens when ./configure --target=host is used and when --enable_debug_frame is set. nm src/.libs/libunwind-aarch64.so.8.0.1 ... U _Uelf64_find_section U _Uelf64_load_debuglink ... This change will prevent build issues until there is remote debug_frame support on arm.
* [x86_64] Remove self-reference from local cursorElia Geretto2021-03-159-31/+78
| | | | | | | | | | | | | | | | | When creating a local x86_64 cursor, its `dwarf.as_arg` member is set to point to the cursor itself, making it a self-referential struct. This does not allow to safely keep a copy of a cursor, as stated in the documentation. In addition, the self-reference is used to access just two members: `uc` and `validate`. This commit modifies `dwarf.as_arg` to pack together both `uc` and `validate`, so the x86_64 cursor is not self-referential anymore and no additional memory allocation is performed. Since `uc` points to a `ucontext_t`, which is at least 2-byte aligned, it is safe to store the `validate` bit in the LSB of the `uc` pointer. Additional checks were added to verify that the `validate` bit is not set when the cursor is non-local.
* Fix typo.Romain Geissler2021-02-171-1/+1
|
* Fix elf get_load_offset when the binary was linked by lld: return the right ↵Romain Geissler2021-02-171-1/+1
| | | | offet.
* Update .travis.ymlNayana Thorat2021-02-171-1/+1
|
* Update configure.acNayana Thorat2021-02-171-0/+1
|
* Fix Clang buildsFlorian Fainelli2021-02-171-0/+1
| | | | | | | | | | | While cross-compiling strace against libunwind for ARM, the configure script of strace failed with: libunwind-ptrace.h:40:27: error: a parameter list without types is only allowed in a function definition it turns out that we do not have a definition for what pid_t should be, so include sys/types.h to remedy that.
* Fix elf get_load_offset when the binary was linked by lld, which defines ↵Romain Geissler2021-02-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | read/executable program header offsets not always aligned on a page size. For example, the same library, linked with ld.bfd will show these PT_LOAD mappings: LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x000000000002b3d0 0x000000000002b3d0 R 0x1000 LOAD 0x000000000002c000 0x000000000002c000 0x000000000002c000 0x000000000001b729 0x000000000001b729 R E 0x1000 LOAD 0x0000000000048000 0x0000000000048000 0x0000000000048000 0x000000000000fb17 0x000000000000fb17 R 0x1000 LOAD 0x0000000000057fb0 0x0000000000058fb0 0x0000000000058fb0 0x00000000000010b0 0x0000000000001508 RW 0x1000 while ld.lld, from the very same .o files, will link it like this: LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x000000000003b32c 0x000000000003b32c R 0x1000 LOAD 0x000000000003b330 0x000000000003c330 0x000000000003c330 0x000000000001b740 0x000000000001b740 R E 0x1000 LOAD 0x0000000000056a70 0x0000000000058a70 0x0000000000058a70 0x0000000000001050 0x0000000000001050 RW 0x1000 LOAD 0x0000000000057ac0 0x000000000005aac0 0x000000000005aac0 0x0000000000000060 0x00000000000004b3 RW 0x1000 Failure to identify the load_offset from iterating the program header lead to later being unable to find the correct proc_info for a given symbol.
* Update ChangeLog git reference locationDirk Mueller2021-02-171-50/+2
| | | | Also delete > 10 year old entries.
* disallow tail-call optimization in testsJameson Nash2021-02-171-0/+1
| | | | This disallows frame reuse for tail and other sibling calls.
* fix build on ARMJameson Nash2021-02-171-1/+1
|
* stop lying about the ARM PC locationJameson Nash2021-02-172-2/+2
| | | | | | I am not sure why it should lie about the PC register and use a different random value (LR), when the actual value is also easily available. The rate of passing tests seems to be the same.
* improve unw_getcontext on ARM/ThumbJameson Nash2021-02-171-19/+33
| | | | | | | | | | | | Better support unw_resume, by returning r0 from the user, instead of hard-coding it to zero (also incidentally fixing a compiler warning about an unused expression). This better mimics a real function call, instead of hard-coding the return value. When in thumb mode, this also means we also need to avoid switching between thumb and ARM upon return to this point, so we need to set the pc accurately to point after the return instruction. When in ARM mode, we need an extra nop also to point at the correct return instruction (since the stored value of pc in the context runs ahead by 8 bytes, while stmia is only 4 bytes).
* Gtest-exc depends on frames not being inlinedJameson Nash2020-12-171-2/+20
| | | | | | The test is unwinding a precise number of frames, which assumes the compiler will not inline these functions. Mark this explicitly to be more reliable, and add some more verbose debugging aids.
* fix aarch64 getcontext functionalityJameson Nash2020-12-171-6/+9
| | | | | Previously the PC value was being set to the LR instead, causing many tests to fail.
* Add support for older versions of AndroidOle André Vadla Ravnås2020-12-0312-7/+132
| | | | | | | Based on: - dl_iterate_phdr() patch by Jeff Muizelaar. - maps_next() improvement from AOSP: 7d46a21. - unwi_unwind_method and x86_local_resume() from AOSP: 1c82a52.
* Fix .debug_frame load_offset calculationOle André Vadla Ravnås2020-12-031-6/+9
| | | | | Typically resulting in a crash during local unwinding on e.g. Android/arm64, where the calculated load_offset would be zero.
* Define the FP register size on PPC to be doubleAlexander Grund2020-10-201-1/+1
| | | | | According to GLIBC headers those are in fact double (8 Byte) not long double (16 Byte)
* fix ppc64 buildDave Watson2020-09-251-1/+1
| | | | | | | | | | Missing open paren. fixes: #210 blame: 77ac8f1c6366192407735b8829253b3810417dea
* Remove s390x-linux from contbuildDave Watson2020-09-251-1/+1
| | | | | | | | Currently failing cxx exception test. Need to debug. Blames to f1cee65e7594db55244723c418559b425297e7e1 hoever, this just exposed the problem by building the test, it's probably been broken for a while (so a revert won't help)
* Check for definition of NT_FILEDave Watson2020-09-211-0/+2
| | | | Conditionally check for NT_FILE note coredump handling.
* Port libunwind to FreeBSD/powerpc64.Piotr Kubaj2020-09-216-117/+248
|
* Fix unwinding of pre-linked librariesMikhail Durnev2020-09-214-8/+38
| | | | | | | | | | | Prelinker updates section .eh_frame but does not change section .debug_frame. Libunwind can work with prelinked .eh_frame, but if fails to find call frame info in unmodified .debug_frame because it does not add the load offset. ELF load offset from PT_LOAD p_vaddr has to be used to correctly interpret addresses in the .debug_frame section. Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
* Use __linux__ define everywhere instead of __linuxMilian Wolff2020-09-0813-21/+21
| | | | | | | | | | | | | | | The libunwind code base uses __linux__ already in many locations, but some others relied on __linux instead. Apparently on some older toolchain configurations, such as Ubuntu Trusty that's still used for AppImage generation sometimes, __linux is never defined - only __linux__ is. Fixes compiler warning on such platforms: ``` coredump/_UPT_get_dyn_info_list_addr.c: In function 'get_list_addr': coredump/_UPT_get_dyn_info_list_addr.c:86:3: warning: #warning Implement get_list_addr(), please. [-Wcpp] # warning Implement get_list_addr(), please. ^ ```