summaryrefslogtreecommitdiff
path: root/src/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* 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 assuming .text and .eh_frame segmentStephen Webb2022-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* Expose get_proc_info_in_range APIAdeel2022-07-081-0/+2
|
* Add port for Linux on LoongArchYouling Tang2021-11-301-0/+38
| | | | | | | | | | | | | | This commit adds support for Linux on LoongArch. Only 64-bit is supported at the moment. The changes were tested on a LoongArch architecture Loongson-3A5000 processor (LoongArch is a new RISC ISA, which is a bit like MIPS or RISC-V.). Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Qing Zhang <zhangqing@loongson.cn> Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Youling Tang <tangyouling@loongson.cn>
* Makefile.am: Add missing riscv header to noinstZhaofeng Li2021-08-271-1/+1
|
* Add port for Linux on RISC-V (riscv)Zhaofeng Li2021-07-061-0/+33
| | | | | This commit adds support for Linux on RISC-V. Only 64-bit is supported at the moment.
* Include extra ia64 files in dist packagekasperk812021-06-171-0/+3
|
* Add support for older versions of AndroidOle André Vadla Ravnås2020-12-031-1/+1
| | | | | | | 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.
* Use NT_FILE to get backing file names if availableStephen Webb2020-07-021-1/+4
| | | | | A Linux core dump passes backing file names for LOAD segments. The coredump library should take advantage of them if they are present.
* Refactor Linux-specific codedump codeStephen Webb2020-07-021-0/+2
| | | | | | Moved Linux-specific core file code into its own separate source file. Moved some generic ELF-note handling code into its own separate source file, too, to replace some macros in anticipation of re-using them for non-Linux core files.
* Add support for zlib compressed elf .debug_frame sectionsDoug Nazar2019-10-031-5/+5
| | | | | In case zlib support is not available, fail to load instead of crashing while trying to read invalid data.
* Add initial support for Solaris x86-64Adeel2019-06-121-0/+9
|
* Add port to Linux on IBM Z (s390x)Michael Munday2018-01-091-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | This adds a port to Linux on the IBM Z platform (a.k.a s390x). It only supports the 64-bit ABI. Most functionality is working and all the tests pass with the exception of the coredump tests*. Unwinding is only supported if DWARF unwind information is present. libunwind can't currently make use of the backchain (if present). The getcontext/setcontext functions only preserve/restore a subset of registers. Currently this only consists of callee-saved registers and some parameter registers. Vector registers and access registers are not saved (and aren't callee- saved) by getcontext and cannot currently be modified. They will however be restored unmodified after resuming a context from a signal handler. There is no special libunwind support for setjmp, the functionality is emulated using glibc (I think all the ports do this for modern Linux kernels). * Unwinding on s390x requires floating point register access which the coredump library doesn't currently support.
* Fix local unwind compilation on ARM (#48)Yichao Yu2017-10-231-0/+1
| | | This was broken by fd02fd59e7462f49311d4e0d6547aacf48fe072b.
* arm: FreeBSD/ARMv6 portKonstantin Belousov2017-08-241-2/+10
| | | | Sponsored by: The FreeBSD Foundation
* configure: Fix dangling link when --disable-static is specifiedDave Watson2017-08-161-1/+3
| | | | | | | | | | If I configure with ./configure --prefix= --enable-shared --disable-static, a broken symlink lib/libunwind-generic.a is installed that points to a missing architecture-specific version of that library (e.g. lib/libunwind-x86_64.a). I suppose that not installing that library is the intended behavior with these configuration settings, so the symlink should not be there in the first place. Reported-by: MarcoKoch
* Add a function to capture the dwarf_reg_states that occur in processingDoug Moore2017-05-121-0/+22
| | | | | the dwarf code for a procedure, and a function to apply a captured dwarf_reg_state later.
* Merge dwarf_find_save_locs into dwarf_step.Doug Moore2017-05-121-2/+2
|
* mips/tilegx: Add missing unwind_i.h header fileDave Watson2017-01-251-2/+2
| | | | reported-by: John Knight <John.Knight@belkin.com>
* dwarf: Configurable cache sizeDave Watson2017-01-131-2/+4
| | | | | | | | Add interface for configurable dwarf cache size * Use item size and round up to nearest power of 2. * Initial cache still exists in BSS. Without this, it means we would fail backtrace when out of memory. The test-mem test fails without this
* Merge branch 'fast-stack-trace-arm' of https://github.com/fillexen/libunwindArun Sharma2014-09-201-2/+2
|\
| * Add fast stack trace on ARM.Filip Nyback2014-07-301-2/+2
| | | | | | | | Port of the fast stack trace feature to ARM.
* | Merge branch 'fast-stack-trace-aarch64' of https://github.com/fillexen/libunwindArun Sharma2014-09-201-2/+3
|\ \
| * | Add fast stack trace on AArch64.Filip Nyback2014-07-301-2/+3
| |/ | | | | | | Port of the fast stack trace feature to AArch64.
* | Add TileGx platform support to libunwind.Zhi-Gang Liu2014-09-081-0/+33
|/ | | | | | | | "make check" passed. ====================================================== All 34 tests behaved as expected (2 expected failures) ====================================================== Zhi-Gang Liu @ Tilera
* link sublibs against liblzma as neededMike Frysinger2014-02-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The coredump/elf32/elf64/elfxx libs use lzma funcs but don't link against it. This produces sub-shared libs that don't link against lzma and can make the linker angry due to underlinking like so: libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=amdfam10 -pipe -g \ -frecord-gcc-switches -Wimplicit-function-declaration -fexceptions \ -Wall -Wsign-compare -Wl,-O1 -Wl,--hash-style=gnu \ -o .libs/test-coredump-unwind test-coredump-unwind.o \ ../src/.libs/libunwind-coredump.so ../src/.libs/libunwind-x86_64.so ../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_footer_decode' ../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_buffer_decode' ../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_size' ../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_end' ../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_uncompressed_size' ../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_buffer_decode' collect2: error: ld returned 1 exit status So add LIBLZMA to the right LIBADD for each of these libraries. URL: https://bugs.gentoo.org/444050 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Missing header in dist tarball.Tim Deegan2014-02-081-1/+1
| | | | Signed-off-by: Tim Deegan <tjd@phlegethon.org>
* Support powerpc64le-linux platformUlrich Weigand2013-12-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the powerpc64le-linux platform. It consists of two main features: - Support little-endian byte order This is done via a "big_endian" member of struct unw_addr_space, which is evaluated by common code via the dwarf_is_big_endian macro, and also in endian-aware code in unw_is_signal_frame. - Support the ELFv2 ABI This is done via an "abi" member of struct unw_addr_space. This is currently only needed in tdep_get_func_addr, since the ELFv2 ABI does not use function descriptors. Both new members are initialized in unw_create_addr_space and ppc64_local_addr_space_init, following the mips precedent. Since ppc32 and ppc64 now no longer share the unw_create_addr_space implementation, the file is duplicated from the ppc directory into ppc32/ppc64. Tested on powerpc64-linux and powerpc64le-linux. Support on LE seems to be as good as existing BE support; I have not attempted to fix the existing shortcomings of PPC support that already cause a number to tests to fail due to unimplemented features. Signed-off-by: Ulrich Weigand <uweigand@de.ibm.com>
* Missing -llzma in libunwind.pcbaserock/morphMasatake YAMATO2013-09-111-3/+1
| | | | | | | | | | | | | | liblzuma used in decoding MiniDebuginfo is not listed in libunwind.pc. Changes in version 2 of patch: * Don't check HAVE_LZMA. It is redundant. * Make liblzma as private libraries in use. Both are suggested by Mike Frysinger <vapier@gentoo.org>. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* Add basic support for the QNX operating systemMatt Fischer2013-05-131-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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
* [PATCH] AArch64 port.Yvan Roux2013-05-111-1/+38
|
* Fix symlink install hookMatt Fischer2013-04-191-3/+3
| | | | | | | | | | | | | | | | | During the install, symlinks are added from libunwind-<arch> to libunwind-generic. However, on platforms that don't support symlinking (such as Windows), the $(LN_S) macro is defined as 'cp -p' instead. This works fine, except that since the target of the symlink is a relative path, the copy will only succeed if the current directory is the directory that contains the file. The solution to this problem suggested in the Autotools manual (see http://www.gnu.org/software/automake/manual/automake.html#Extending) is to simply cd into the correct directory first. This patch makes that change for the symlinks that are being made during install. [ edit: use relative path for the link name as well ]
* Added --enable-setjmpMatt Fischer2013-04-191-2/+6
| | | | | | Currently, libunwind-setjmp is built whenever local unwinding is built. This patch adds an explicit flag to control it instead. The default if not specified is to follow the old behavior.
* Added --enable-ptraceMatt Fischer2013-04-191-3/+9
| | | | | | | This change adds a manual override to control building of the ptrace library, similar to the existing --enable-coredump option. The default is set based on the existence of sys/ptrace.h, allowing it to be automatically disabled for platforms that do not have ptrace.
* Update to v1.1v1.1Arun Sharma2012-10-051-1/+1
|
* Teach autotools current ARM `ex_tables.h' locationTommi Rantala2012-09-281-2/+1
|
* SuperH portTommi Rantala2012-09-281-0/+33
| | | | | | | Add support for the 32bit SuperH architecture running Linux. Specifically, support is added for SH4, and support for earlier SH versions and to the 64bit SH5 are left out. This was tested in qemu with a little-endian SH4 debian image & GCC 4.7 cross compiler.
* Create and install pkg-config .pc filesAlexander Toresson2012-09-151-0/+12
| | | | | [Edit: renamed to libunwind-generic.pc and some .pc files created only when needed -- asharma@fb.com]
* build: make libunwind-coredump build optionalCody P Schafer2012-09-151-1/+4
| | | | | | | | Disable the building of libunwind-coredump except on x86_64 and x86 (where implimentations exsist). Allow overriding of this autodetection via --enable-coredump and --disable-coredump.
* Fix IA64 separate builddir cursor generationTommi Rantala2012-09-041-6/+6
| | | | | IA64 build was failing when using a separate build directory. Refer to the source files with `$srcdir' to fix the build.
* Use libtool to build libunwind-ptraceArun Sharma2012-08-181-3/+2
|
* Add liblzma detection to configure scriptMartin Milata2012-08-101-0/+3
| | | | Signed-off-by: Martin Milata <mmilata@redhat.com>
* Allow IA64 cross-compilationTommi Rantala2012-07-311-7/+8
| | | | | | | | | | Change the way we generate the cursor header files, so that we do not need to invoke IA64 binaries, which would fail when cross-compiling libunwind. Adopt the strategy used in the Linux kernel build system, and parse our annotated offset information from the assembler file produced by the compiler.
* Build libunwind-coredump using libtoolMartin Milata2012-07-041-5/+8
| | | | | | | So that it builds shared/pic library that can be linked with other libraries. Signed-off-by: Martin Milata <mmilata@redhat.com>
* Fix compilation on IA64Martin Milata2012-05-231-2/+2
| | | | | | | | | | - 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>
* ia64: move ia64 specific code out of dwarfArun Sharma2012-03-291-2/+2
| | | | | We still need to fixup the callers to pick dwarf_find_unwind_table vs ia64_find_unwind_table in a target dependent way.
* Implement register read for FreeBSD coredumps.Kostik Belousov2012-03-131-1/+2
| | | | | Rename _UCD_access_reg.c to _UCD_access_reg_linux.c, to have per-OS coredump register reader.
* Add support for unwinding coredump imagesArun Sharma2012-03-121-1/+19
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Move some dwarf functionality from ptrace to dwarfArun Sharma2012-03-121-2/+4
| | | | | | | | 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>
* Fix libunwind-generic.so symbolic link never being created in make installTommi Rantala2012-01-231-1/+1
| | | | | | | | | | | Commit 7d43108f9c41a2ccbe0adc8713523ad60469e026 ("No libunwind-generic.so if configured with --disable-shared") introduced a check to avoid creating a broken libunwind-generic.so link, but the result of the commit is that libunwind-generic.so is never created (at least when installing to a clean directory). We need to check for the installed libunwind-$(arch).so file, libunwind-generic.so will be the symbolic link name.