1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-18 22:07:38 +01:00
Commit graph

2961 commits

Author SHA1 Message Date
dave lerner
8028a537dd unw_is_signal_frame should return false/0 for bad addresses
access_mem() could fail and return a non-zero value, which callers
interpret as boolean true.

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
2013-03-10 14:59:44 -07:00
Chris January
679b65cd22 dwarf: Fix the order of the operands to the relational operators
dwarf_eval_expr are reversed compared with the DWARF spec.
2013-02-04 19:36:33 -08:00
Ladislav Michl
10b064ffe9 Support building with older compilers.
Add a check for __builtin_unreachable.
2012-11-24 21:37:07 -08:00
Arun Sharma
ae3dd9417a Add known test failures to XFAIL_TESTS 2012-10-27 19:37:45 -07:00
Arun Sharma
d7322f0f64 Update to v1.1 2012-10-05 21:54:17 -07:00
Tommi Rantala
adae66d2e2 Fix x86-64 debug build -Wformat warning
src/x86_64/Gstep.c: In function '_ULx86_64_step':
src/x86_64/Gstep.c:204:4: warning: unknown conversion type character 'r' in format [-Wformat]
2012-10-05 21:24:36 -07:00
Tommi Rantala
96c1bca2b0 Fix header inclusion order in `src/elfxx.c'
Make sure that we have included `config.h' before checking HAVE_LZMA.
This makes a difference at least on MIPS, where we include `elfxx.c'
directly. For other platforms this does not make much difference, as we
are already indirectly including `config.h' from other headers.
2012-10-05 21:24:30 -07:00
Arun Sharma
cb3fbbb172 Reduce the number of ifdefs in machine independent code
Hopefully we don't have too many GNUC users who don't have
fetch and add.
2012-09-29 12:22:47 -07:00
Tommi Rantala
6456da2dc1 Assign `func' just once in Ltest-nocalloc glibc case 2012-09-28 14:51:22 +03:00
Tommi Rantala
65f936402d Add arguments to malloc and calloc prototypes in Ltest-nocalloc 2012-09-28 14:51:22 +03:00
Tommi Rantala
249ff2f840 Remove unused variable in Ltest-nocalloc 2012-09-28 14:51:22 +03:00
Tommi Rantala
e9f161a677 Replace empty argument lists with `void' in tests 2012-09-28 14:51:22 +03:00
Tommi Rantala
890e23eb9d Prefer NULL over zero 2012-09-28 14:51:21 +03:00
Tommi Rantala
aebba1f8a7 Apply `define_lock()'
We have a nice macro for defining pthread mutexes, use it.
2012-09-28 14:51:21 +03:00
Tommi Rantala
22aff2cc1f Fix second operand read in dwarf_eval_expr()
Due to bad bracketing, the second operand was never read for dwarf
expressions that take two operands.

Caught with sparse.
2012-09-28 14:51:21 +03:00
Tommi Rantala
65bdcc6f9d Teach autotools current ARM `ex_tables.h' location 2012-09-28 14:51:21 +03:00
Tommi Rantala
2fbbf276b3 Use shared `ARRAY_SIZE' in IA64 tests 2012-09-28 14:51:21 +03:00
Tommi Rantala
6b55e0ab51 Use `UNUSED' in tests 2012-09-28 14:51:21 +03:00
Tommi Rantala
5e7e890a0b Plug in `ALIAS' attribute 2012-09-28 14:51:21 +03:00
Tommi Rantala
7d471b1440 Define and use `CONST_ATTR' 2012-09-28 14:51:21 +03:00
Tommi Rantala
e0653f9e3a Define and use `WEAK' 2012-09-28 14:51:21 +03:00
Tommi Rantala
e3e49dc28a Define and use `NOINLINE' 2012-09-28 14:51:19 +03:00
Tommi Rantala
397f32a378 Plug in `ARRAY_SIZE' in ptrace code 2012-09-28 14:50:03 +03:00
Tommi Rantala
dcbe6836eb IA64: constify read only arrays in `tdep_init()' 2012-09-28 14:50:03 +03:00
Tommi Rantala
088ac53775 Constify `operands' in src/dwarf/Gexpr.c 2012-09-28 14:50:03 +03:00
Tommi Rantala
ee8df26288 Constify `dwarf_to_unw_regnum_map' 2012-09-28 14:50:03 +03:00
Tommi Rantala
a9b5b10f23 Set `_UPT_reg_offset' read only
We do not modify `_UPT_reg_offset', so let's set it `const'. Given that
the array is exported, it's technically possible that some library user
is actually modifying the content, but does not seem really all that
likely.
2012-09-28 14:50:03 +03:00
Tommi Rantala
fca254a9b4 IA64: give prototype for `ia64_find_unwind_table()'
src/ptrace/_UPT_find_proc_info.c: In function 'get_unwind_info':
src/ptrace/_UPT_find_proc_info.c:67: warning: implicit declaration of function 'ia64_find_unwind_table'
2012-09-28 14:50:03 +03:00
Tommi Rantala
e2d5cdd22d ppc32: include `compiler.h' for UNUSED in ucontext_i.h 2012-09-28 14:50:03 +03:00
Tommi Rantala
8d5b1aeeff SuperH port
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.
2012-09-28 14:50:03 +03:00
Tommi Rantala
7d77ef4d82 Enable coredump library build on ARM by default
The ARM coredump library compiles, ship it!
2012-09-28 14:50:03 +03:00
Tommi Rantala
79c2c254a7 MIPS coredump support
Add MIPS support to the coredump library. Explicit support for the MIPS
program counter register is added so that we can start backtracing from
the program counter value we read from a core dump. The PC register
support was not strictly required for local backtracing, and we will in
fact just plug the return address to the PC register in getcontext().

I have only tested the 32bit "OABI" paths.
2012-09-28 14:50:03 +03:00
Tommi Rantala
ded94b98ff Stop including `memory.h'
I am unable to find any reference to `memory.h' in the C99 and C11
committee drafts, so include `string.h' instead when we need memset() or
similar.
2012-09-28 14:50:03 +03:00
Tommi Rantala
58354c94d7 Nuke HAVE_BACKTRACE
We do not really need to care if the system provides `backtrace()',
since we will want to test the one provided in libunwind, not the one
that is provided by the system. The `backtrace()' calls should already
be aliased to `unw_backtrace()', but if that is not working for whatever
reason, we can call `unw_backtrace()' explicitly.
2012-09-28 14:50:03 +03:00
Tommi Rantala
848ad53a47 Call snprintf() from signal handler only if required in test-async-sig
snprintf() is not guaranteed to be safely callable from a signal
handler, so avoid calling it in the default non-verbose case.
2012-09-28 14:50:03 +03:00
Tommi Rantala
7263a97ced Roll test-nocalloc' into Ltest-nocalloc.c'
We are building only a UNW_LOCAL_ONLY build of `test-nocalloc', and the
"generic" build would not be very interesting. Roll the whole test into
`Ltest-nocalloc.c'.
2012-09-28 14:50:03 +03:00
Tommi Rantala
aeb1afc65d Call `unw_backtrace()' explicitly in test-flush-cache.c 2012-09-28 14:50:03 +03:00
Tommi Rantala
643fc92e91 Rename rs-race' to Lrs-race'
Only build a "local-only" version of `rs-race'. The "generic" build is
not very entertaining, as the `unw_set_caching_policy()' calls
manipulate the `unw_local_addr_space' in libunwind-$arch.so, while the
`backtrace()' calls use the address space object from libunwind.so
behind the scenes.
2012-09-28 14:50:03 +03:00
Tommi Rantala
0d7738ed4f Cleanup dynamically allocated memory before exit in tests
Cleanup dynamically allocated memory before exit in tests in a few
places where missing. While such cleanups right before exit do not
usually make much sense (as the operating system would cleanup anyway,
so manual cleanups only burn CPU cycles), we will want to catch any
potential problems in libunwind related to the cleanups. This also stops
valgrind complaining about unreleased memory.
2012-09-28 14:50:02 +03:00
Tommi Rantala
438d9de675 Remove unneeded `config.h' inclusion in Gtest-nomalloc 2012-09-28 14:50:02 +03:00
Tommi Rantala
be230add88 Rename test-varargs' to Ltest-varargs'
This testcase only uses the local-only `unw_backtrace()' from libunwind,
and a "generic" build of this test case would not be interesting.
2012-09-28 14:50:02 +03:00
Tommi Rantala
939a5e195e Annotate potentially unused variable in tests/test-coredump-unwind.c
tests/test-coredump-unwind.c: In function 'handle_sigsegv':
test-coredump-unwind.c:216:15: warning: variable 'uc' set but not used [-Wunused-but-set-variable]
2012-09-28 14:06:07 +03:00
Tommi Rantala
7673df21ff Annotate potentially unused variable in tests/Gtest-trace.c
tests/Gtest-trace.c: In function 'sighandler':
tests/Gtest-trace.c:179:15: warning: unused variable 'uc' [-Wunused-variable]
2012-09-28 14:06:07 +03:00
Tommi Rantala
0c838c4d44 Annotate potentially unused variable in tests/Gtest-bt.c
tests/Gtest-bt.c: In function 'sighandler':
tests/Gtest-bt.c:158:15: warning: unused variable 'uc' [-Wunused-variable]
2012-09-28 14:06:07 +03:00
Tommi Rantala
23fdda6a28 Workaround volatileness warning in tests/ia64-test-setjmp.c
tests/ia64-test-setjmp.c:76: warning: function return types not compatible due to 'volatile'
2012-09-28 14:06:07 +03:00
Tommi Rantala
074e328d46 Avoid -Wunused-value warning in tests/Gia64-test-stack.c
tests/Gia64-test-stack.c: In function 'do_unwind_tests':
tests/Gia64-test-stack.c:91: warning: value computed is not used
2012-09-28 14:06:07 +03:00
Tommi Rantala
68b20804e4 Clear out `ip' to avoid -Wuninitialized warning in tests/test-coredump-unwind.c
This one is for architectures that we have not specifically added
support for in `tests/test-coredump-unwind.c'.

tests/test-coredump-unwind.c: In function 'handle_sigsegv':
test-coredump-unwind.c:238:10: warning: 'ip' is used uninitialized in this function [-Wuninitialized]
2012-09-28 14:06:07 +03:00
Tommi Rantala
d3fd3dc3ca Default to non-verbose mode in Ltest-cxx-exceptions 2012-09-28 14:06:07 +03:00
Tommi Rantala
cc6cd621ea HPPA: kludge out unused variable in unw_get_save_loc() stub 2012-09-28 14:06:07 +03:00
Tommi Rantala
fc38a5339d HPPA: properly check dwarf_get() return value in unw_step() 2012-09-28 14:06:07 +03:00