| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A recent change broke builds for many non-recent and non-Linux targets
by adding code dependent on a non-portable preprocessor macro
SHF_COMPRESSED found in some more recent GLIBC elf.h headers.
This fixes the firt part of #190.
Signed-off-by: Stephen Webb <swebb@blackberry.com>
|
|
|
|
|
|
| |
Described in issue #176. Taken from Alpine Linux project.
Change __sigset_t to sigset_t
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
PT_GNU_EH_FRAME
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Make sure to unmap the currently mapped elf image before mapping
another image in CD_get_proc_name. If not, the reference to that
image is lost and the memory is leaked.
Signed-off-by: Sturle Mastberg <smastber@cisco.com>
Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Making all other archs consistent with IA64 which should not have this problem.
Also move the FIXME to the correct place.
Also add some minimum comments about this...
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Comparing against an address of `last_good_addr` wont ever be true.
Signed-off-by: Bert Wesarg <bert.wesarg@tu-dresden.de>
|
|
|
| |
Signed-off-by: Bert Wesarg <bert.wesarg@tu-dresden.de>
|
|
|
| |
The name must be unw_init_local_common
|
| |
|
|
|
|
|
| |
In case zlib support is not available, fail to load instead of
crashing while trying to read invalid data.
|
|
|
|
| |
I made this table when trying to fix recent packaging issues in OpenWrt . It could help track progress on musl-libc support and may also help other distros.
|
|
|
| |
Add a check and compatibility code.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* x86_64: Add fixup code if previous RIP was invalid
Previous RIP could become invalid if a bad function pointer
was followed. Calling unwind from a signal frame in this case
skips the frame that called the bad pointer.
Check if the value at RSP looks to be valid in this case. It
should be the value of RIP pushed to the stack by the CALL instruction.
If it looks valid use this value as the next frames RIP else fallback
to the previous method.
|
| |
|
| |
|
|
|
|
|
|
|
| |
clang 8:
> x86_64/Gstash_frame.c:113:47: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
gcc 8:
> x86_64/Gstash_frame.c:113:15: warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
|
|
|
|
|
| |
Use the define for dwarf_addr_size in include/dwarf_i.h instead of hardcode(4) to support various MIPS architectures.
Signed-off-by: Archer Yan <ayan@wavecomp.com>
|
|
|
|
| |
This change fixes all empty if/else block warnings from gcc.
It does not change the functionality of libunwind in any way.
|
|
|
|
|
|
|
|
|
|
|
| |
1. hidden _step_n64 to avoid a strange bug which
will reproduce under `perf report`.
The value `tdep_init_done` of suddenly be changed to zero
when entering `_step_n64` from `unw_step`.
2. refactor code to improve the readability.
use `FP_REG`, `SP_REG` and `RA_REG` to abstract the guessing
logical.
|
|
|
|
| |
Use correct size variable.
|
|
|
| |
x86_64: tsan clean
|
|
|
|
|
| |
The dwarf-eh.h header is not self-contained, which causes problems depending on which order headers are included. In particular, it references the Elf_W macro but does not include its definition. If dwarf-eh.h is included after dwarf_i.h everything works, but if you reverse this order you get compile errors. This patch removes the implicit header ordering dependency by making sure the definition of Elf_W is visible in dwarf-eh.h.
I include libunwind_i.h rather than the elfxx.h files directly because libunwind_i.h contains macro logic to choose which elf header to include, and I didn't want to duplicate that.
|
|
|
|
|
| |
Clang doesn't respect the static alias, resulting in global instead
of local symbols, and name collisions. Work around for clang by always
going through the PLT (at a small perf hit)
|
| |
|
|
|
|
|
| |
- gp at 8(sp)
- fp at 16(sp)
- ra at 24(sp)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the README's formatting shows up rather poorly on GitHub, as
the file isn't written as a Markdown document but GitHub tries to render
it as one due to the symlink from README.md to README. This commit
reformats the file as a Markdown document, preserving the original
content with two exceptions:
1. The platform support list has been converted to a Markdown table.
2. The severely outdated information regarding libexecinfo on FreeBSD
has been amended and the note about FreeBSD 8.0 removed.
|
|
|
|
|
|
|
|
| |
dwarf: Push correct CFA onto stack for dwarf expression evaluation.
This change fixes a bug where stale CFAs were pushed onto the dwarf
expression stack before expression evaluation. Some optimising compilers
emit CFI which relies on this being correct.
|
|
|
| |
This patch adds two opcodes to the operands table in Gexpr.c, which is a mapping between opcodes and the number and types of the operands for those opcodes. Two opcodes, DW_OP_constu and DW_OP_consts are missing from this table, which caused failures later in the CFI expression parsing logic. This patch adds the missing information into the table, and thus allows correct parsing of CFA_def_cfa_expression, CFA_expression and CFA_val_expression expressions which contain the offending opcodes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise this fails to compile with -stc=c99 like:
$ cat <<EOF > bla.c
#include <libunwind.h>
int main()
{
unw_tdep_context_t *uc = NULL;
unw_tdep_getcontext(uc);
}
EOF
# This works
$ gcc bla.c
# This does not
$ gcc -std=c99 bla.c
In file included from /usr/include/aarch64-linux-gnu/libunwind.h:7,
from bla.c:1:
bla.c: In function ‘main’:
bla.c:6:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘asm’
unw_tdep_getcontext(uc);
^~~~~~~~~~~~~~~~~~~
bla.c:6:5: error: ‘mcontext_t’ {aka ‘struct <anonymous>’} has no member named ‘regs’; did you mean ‘__regs’?
unw_tdep_getcontext(uc);
^~~~~~~~~~~~~~~~~~~
bla.c:6:5: error: ‘unw_base’ undeclared (first use in this function); did you mean ‘unw_ctx’?
unw_tdep_getcontext(uc);
^~~~~~~~~~~~~~~~~~~
bla.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
bla.c:6:5: error: invalid lvalue in asm output 0
unw_tdep_getcontext(uc);
^~~~~~~~~~~~~~~~~~~
See https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html:
The asm keyword is a GNU extension. When writing code that can be
compiled with -ansi and the various -std options, use __asm__ instead of
asm (see Alternate Keywords).
|
|
|
|
|
| |
than malloc and qsort, to process debug frames and reduce problems with
non signal-safe functions in supposedly signal-safe libunwind procedures.
|
|
|
|
|
| |
Fix missing Gparser.c changes from patchset
'aarch64 PLT entry recognition & fixes'
|
|
|
| |
implement _UPT_access_fpreg, _UCD_access_reg_freebsd for aarch64, and add a unw_fpsimd_context_t instead of using the one from the linux headers.
|