| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
A recent change missed adding a new header to the dist list. `make distckeck`
now runs successfully once again.
Fixes #409
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
This commit adds support for Linux on RISC-V. Only 64-bit is supported
at the moment.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
A Linux core dump passes backing file names for LOAD segments. The coredump
library should take advantage of them if they are present.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
In case zlib support is not available, fail to load instead of
crashing while trying to read invalid data.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
This was broken by fd02fd59e7462f49311d4e0d6547aacf48fe072b.
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
the dwarf code for a procedure, and a function to apply a captured
dwarf_reg_state later.
|
| |
|
|
|
|
| |
reported-by: John Knight <John.Knight@belkin.com>
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| | |
Port of the fast stack trace feature to ARM.
|
|\ \ |
|
| |/
| |
| |
| | |
Port of the fast stack trace feature to AArch64.
|
|/
|
|
|
|
|
|
| |
"make check" passed.
======================================================
All 34 tests behaved as expected (2 expected failures)
======================================================
Zhi-Gang Liu @ Tilera
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Tim Deegan <tjd@phlegethon.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ]
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
[Edit: renamed to libunwind-generic.pc and some .pc files
created only when needed -- asharma@fb.com]
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
IA64 build was failing when using a separate build directory. Refer to
the source files with `$srcdir' to fix the build.
|
| |
|
|
|
|
| |
Signed-off-by: Martin Milata <mmilata@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
So that it builds shared/pic library that can be linked with other
libraries.
Signed-off-by: Martin Milata <mmilata@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
| |
We still need to fixup the callers to pick dwarf_find_unwind_table
vs ia64_find_unwind_table in a target dependent way.
|
|
|
|
|
| |
Rename _UCD_access_reg.c to _UCD_access_reg_linux.c, to have
per-OS coredump register reader.
|
|
|
|
| |
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|