summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Adjust backtrace2 signatureHEADv1.7.0-rc2masterGregory LEOCADIE2023-01-115-11/+19
|
* Add unw_backtrace2.man which reference unw_backtrace.manGregory LEOCADIE2023-01-111-0/+1
|
* Add documentationGregory LEOCADIE2023-01-112-2/+20
|
* Fix bug + add testGregory LEOCADIE2023-01-113-3/+77
|
* Fix bugGregory LEOCADIE2023-01-111-1/+1
|
* Add unw_backtrace2 implementationGregory LEOCADIE2023-01-112-3/+31
|
* README: Remove outdated informationAdrian Bunk2023-01-061-38/+1
| | | | | | Documentation tends to get outdated, and "Newly added" does not age well. Remove descriptions of toolchain problems that were fixed ~20 years ago.
* Bump to 1.7-rc1v1.7.0-rc1Dave Watson2023-01-051-2/+2
|
* Remove the unused powerpc setcontext() dummiesAdrian Bunk2023-01-042-18/+0
|
* fix the way load offset is detected so it works with lld linkerDaniel Moody2022-12-283-9/+5
|
* Add fix for arm and aarch64Gregory LEOCADIE2022-12-282-0/+18
|
* Fix frame categorizationGregory LEOCADIE2022-12-281-0/+6
|
* Disable Ltest-init-local-signal on ia64Adrian Bunk2022-12-281-1/+5
| | | | | This makes the tests build on ia64 so that they can be run, a proper fix would be to add unw_init_local2() to src/ia64/Ginit_local.c
* update ci badges in the readmekasperk812022-12-064-107/+5
|
* Gia64-test-nat.c: #include <signal.h> for sigaction()Adrian Bunk2022-11-301-0/+1
|
* Updated to determine PAGE_SIZE dynamically for loongarch64Shuo Wang2022-11-151-13/+8
| | | | | | apply e85b65ce fix to loongarch64 Signed-off-by: Shuo Wang <wangshuo_1994@foxmail.com>
* check-namespace.sh: adjust aarch64 symbolsStephen Webb2022-11-081-33/+26
| | | | | | | Some symbols for aarch64 were missing, and some were marked as extraneous in this ABI checker. Fixes #389.
* arm64: Add test for SVE unwinding from signal handlerJames Clark2022-11-073-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is skipped if the compiler doesn't support SVE, otherwise it uses some SVE intrinsics across a few functions and then sends a signal to take a backtrace from the sum() function. Without the previous SVE changes, the unwinding fails at sum() and the stack looks like: -> signal_handler() -> kill() -> sum() With the changes the full stack to main can be unwound and the test passes: -> signal_handler() -> kill() -> sum() -> square() -> main() Currently this test will pass on a Graviton 3 instance on AWS and with gcc-10. Co-authored-by: Kent Cheung <Kent.Cheung@arm.com> Signed-off-by: James Clark <james.clark@arm.com> Change-Id: Ibe38e6b0fa26276c545f044ffdd26fbdb2789c38
* arm64: Add support for VG register in signal framesJames Clark2022-11-073-2/+97
| | | | | | | | | | | | | | | | Allow local and remote unwinding through signal frames when variable length SVE registers are pushed onto the stack. The vector length is saved by the kernel into the signal context, but it is not scaled in the same way that dwarf expects it to be. Therefore a conditional has been added to tdep_access_regs() that scales the value depending on whether it is going to be accessed through a register or through memory. Signed-off-by: James Clark <james.clark@arm.com> Change-Id: Ie16aa22b36127ba5aa81f20280b1df7e4ba6d49b
* arm64: Add VG (Vector Granule) pseudo registerJames Clark2022-11-075-3/+18
| | | | | | | | | | | | | | This allows remote only unwinding though an SVE function that pushes SVE registers onto the stack[1]. The remote unwinder is responsible for providing the value of the VG register at the time the sample was taken. [1]: https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst Signed-off-by: James Clark <james.clark@arm.com> Change-Id: I8a203b73b17cd4a07afc1fdc55ad11765d73e173
* arm64: Refactor signal frame register locationsJames Clark2022-11-071-34/+34
| | | | | | | | | | | Remove the 0 magic number and use the existing macro DWARF_MEM_LOC that makes it more readable that signal frame locations are stored in memory. No functional changes. Signed-off-by: James Clark <james.clark@arm.com> Change-Id: I5b15b4111290dec8e678b8bbd8c9d62d6e52fda0
* [LoongArch64] Simplify loongarch64_local_resumeWANG Xuerui2022-11-071-24/+17
| | | | | | | | | Simplify the restoration sequence in case of tail calls, and use the long-supported "jr" alias instead of the fully spelled out jirl form for brevity. Suggested-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn> Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* [LoongArch64] XFAIL the ptrace tests requiring PTRACE_SINGLESTEPWANG Xuerui2022-11-071-0/+4
| | | | | | | The ptrace usage is not currently supported, so XFAIL for clean test results. With this applied, all tests pass on a native LoongArch build. Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* [LoongArch64] Reflect the kernel ABI changes since the port went upstreamWANG Xuerui2022-11-074-11/+7
| | | | | | | | | | | | | | | | | | The original port was done with an early in-house port of Linux that, in addition to slightly different UAPI headers, also featured a MIPS-like ABI (the so-called "old world" ABI). The upstream ABI has been revised since long ago and already frozen, so adjust the port for the "new world". In particular, we don't have the 24-byte signal trampoline area any more which was a MIPS o32 thing. We don't need to keep compatibility for the old-world kernels, because distributions using said kernels invariably packaged their own libunwind fork with corresponding support, and the few users tracking upstream kernels should all have moved on. Fixes: c5f1d12c77de ("Add port for Linux on LoongArch") Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* [LoongArch64] Fix build with upstream kernel headersWANG Xuerui2022-11-072-64/+64
| | | | | | | | | | | | The libunwind LoongArch64 port was done using an early fork of Linux, with slightly different naming for the register definition symbols. The libunwind port went in before the kernel port got finalized and merged, and was never adjusted; so fixing the usage here before release. Practically no user would be affected since everyone on (development) upstream kernels would have migrated long ago. Fixes: c5f1d12c77de ("Add port for Linux on LoongArch") Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* fix more warningskasperk812022-10-216-7/+7
|
* Fix a few warningsAdeel2022-10-145-6/+6
|
* Fix freebsd arm64 buildAdeel2022-09-231-2/+2
|
* tests/run-coredump-unwind: Skip test if no coredump has been createdFlorian Weimer2022-09-171-0/+4
| | | | | | In some build environments, coredumps are not created even if the corresponding ulimit is positive. This change skips the test if the coredump is missing.
* Fix outdated prefix pathSuraj Shirvankar2022-09-131-2/+2
|
* Account for lr in aarch64's uc_addrAdeel2022-09-051-1/+3
|
* Fix undefined behavior issues in aarch64Adeel2022-09-021-8/+17
|
* Fix `make distcheck` due to missing coredump headerStephen Webb2022-08-231-1/+3
| | | | | | | A recent change missed adding a new header to the dist list. `make distckeck` now runs successfully once again. Fixes #409
* Stop the autotools nag about AC_CONFIG_MACRO_DIRSStephen Webb2022-08-134-6/+10
| | | | | | | | | | | | | All warnings should be heeded, including the ones spat out by autoreconf. In this case, autoconf wanted a place to generate its m4 files into and automake wanted the right target names in doc/Makefile.am. Also added AM_SILENT_FILES([yes]) to reduce the visual noise in build output to make spotting build problems easier. You can override the silent default by running `make` with `V=0` appended to the command line. Removed the unnecessary and unused acinclude.m4 file to reduce clutter in the source directory.
* Add support for unwinding from the Linux vsyscall regionkent-cheung-arm2022-08-132-4/+31
| | | This change fixes unwinding from the vsyscall region. Although vsyscall has been phased out, it is still possible to call into it at an address where libunwind is unable to step out of.
* Fix __SOFTFP__ case for arm getcontextAdeel2022-08-052-18/+25
|
* Add RISC-V machine value in remote unwindAdeel2022-08-051-0/+1
|
* Cross-build CI `make check` QEMU tweakStephen Webb2022-08-052-14/+175
| | | | | | | | | | | | | The cross-built CI runs using GiotHub actions were using QEMU to run `make check`. Instead, the host should run `make check` and the actual test binary should be run under QEMU. This change configures the cross build to use a (new) qemu-test-driver script as the test harness, which in turn invokes the test under QEMU. The tests are linked to the libunwind libraries statically to avoid complicating the search paths and invoking libtool. Fixes #401.
* Fix typos (#397)Adeel Mujahid2022-08-0423-373/+373
| | | | | | | * Fix typos * Cleanup trailing whitespaces in committed files * Update include/tdep-ia64/libunwind_i.h
* updated dist to focal for s390x jobsdandotimujahid2022-07-271-0/+1
|
* Add support for arm fp registers unwindJan Vorlicek2022-07-266-32/+103
|
* Make `sigaltstack()` optionalStephen Webb2022-07-263-7/+24
| | | | | | Some (older) OSes do not support this POSIX function. Make it optional. Fixes #379.
* Stop assuming .text and .eh_frame segmentStephen Webb2022-07-2612-259/+624
| | | | | | | | | | | | | | | | | | | | | | | The coredump remote was architected on the assumption that the .text and .eh_frame sections were mapped onto the same segment, and that that segment was always the first PT_LOAD segment in an ELF file. Well, that was never a valid assumption, and moderns releases of various toolchains have started splitting the PT_LOAD segments for security reasons. This change implements an M:N mapping of PT_LOAD segments in a coredump file to backing ELF files and calculates and adjusts offsets appropriately. Because the backing files get mapped in a lot of file I/O operations have been replaced with simple memory reads. Once a backing file is memory mapped is stays mapped until the address space is destroyed. The ucd_*.[ch] files contain only functions that should not be exposed through the public API so they;re not mangled using the UB naming schedule because I just bring myself to write code with undefined behaviour. Reformatted some of the changed files using `astyle --style=gnu` for internal consistency withing the file. Fixes #363
* Find segment containing .text by flag not orderStephen Webb2022-07-261-1/+1
| | | | | | | | | The existing code was identifying the segment containing the executable code (.text section) by assuming it was effectively the first loadable segment. Th has always worked up until recently but was an invalid assumption. The right thing to do is check the segment flags to see if the execute bit is set. This change does just that. Tested on Linux x86_64, no new regressions.
* Autodetect presence of elf_fpregset_tStephen Webb2022-07-154-1/+11
| | | | | | | Data of this type was added for the s390x port doesn't exists on all OSes. It needs to be autodetected and optioned out. Fixes #373
* Expose get_proc_info_in_range APIAdeel2022-07-089-27/+337
|
* Add remote unwinding support for macOS (#365)Adeel Mujahid2022-06-2821-24/+146
| | | | | | | | * Add remote unwinding support for macOS * Fix broken Win build by bumping minimum language requirement to C11 * Update license headers * Rename remote_unwind to remote * Revert Gparser.c
* Add autodetection of procfs_status typeStephen Webb2022-06-244-40/+50
| | | | | | | | | | Instead of struct elf_prstatus or struct prstatus, QNX has a procfs_status typedef. Added autoconfigury to detect that and switched using a preprocessor macro to define the type used as a typedef of UCD_proc_status_t instead. Also changed some field name references where required. Signed-off-by: Stephen Webb <swebb@blackberry.com>
* Remove bashisms from tests/check-namespace.shStephen Webb2022-06-231-1/+1
| | | | | | Stray errors were being reported on travis.ci because /bin/sh was not bash. Fixes #374.
* Allow an alternate LOG_DRIVER to be specifiedStephen Webb2022-06-232-0/+8
| | | | | | | Specifying --with-testdriver=TESTDRIVER at configure time allows the substitution of a alternative LOG_DRIVER to be specified to enable remote testing of a cross-built target. See the automake docuemntation on Custom Test Drivers for more information.