| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Prelinker updates section .eh_frame but does not change section .debug_frame.
Libunwind can work with prelinked .eh_frame, but if fails to find call frame
info in unmodified .debug_frame because it does not add the load offset.
ELF load offset from PT_LOAD p_vaddr has to be used to correctly interpret
addresses in the .debug_frame section.
Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The libunwind code base uses __linux__ already in many locations, but
some others relied on __linux instead. Apparently on some older
toolchain configurations, such as Ubuntu Trusty that's still used for
AppImage generation sometimes, __linux is never defined - only
__linux__ is. Fixes compiler warning on such platforms:
```
coredump/_UPT_get_dyn_info_list_addr.c: In function 'get_list_addr':
coredump/_UPT_get_dyn_info_list_addr.c:86:3: warning: #warning Implement get_list_addr(), please. [-Wcpp]
# warning Implement get_list_addr(), please.
^
```
|
|
|
|
|
|
|
|
| |
Using binutils 2.34 or 2.35, libunwind fails to link on ia64 with:
/usr/bin/ld: .IA_64.unwind has both ordered [`.IA_64.unwind' in unwind/.libs/GetIPInfo.o] and unordered [`.IA_64.unwind' in ia64/.libs/dyn_info_list.o] sections
Fix this by using the right flags and type for the section, taken from
binutils's gas/testsuite/gas/ia64/unwind.s.
|
|
|
|
|
|
|
| |
Bernhard Übelacker noticed that Ltest-cxx-exceptions was actually
testing the gcc implementation due to not linking with libunwind.
Fixes: #129
|
|
|
|
|
|
|
|
| |
When we are backtracing processes running in a container, we cannot rely on ELF paths
in /proc/[pid]/maps. Those paths are valid inside the container. We have to add
/proc/[pid]/root to each path to access the ELF files from outside of the container.
Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Fixed a missing conjunction on the mips target.
|
|
|
|
|
| |
Somehow a typo crept in in a previous change. You try and try but still can't
win.
|
|
|
|
| |
Make an additional Linuxism dependent on building for Linux.
|
|
|
|
|
| |
Use the system header <sys/syscall.h> only on those OS targets for which it is
available.
|
|
|
|
|
|
|
|
|
|
| |
Handle the case in which the system-supplied elf.h file uses C enums instead of
macros preprocessor defines for some constants.
Made the inclusion of the discovered elf.h file more consistent for portability
to non-Linux targets.
Put some libunwind-specific ELF macros into the UNW_ namespace.
|
|
|
|
|
|
|
|
|
| |
Extend the endianness macros to support systems that define them in
<sys/param.h> and replace the use of names that violate ISO/IEC 9899.
Rename endianness macros used in code to use properly-namespaced macros for
portability and cross-hosting compatibility. Add inline functions to perform
common operations with the macros.
|
|
|
|
|
| |
Use the (former) POSIX-standard <ucontext.h> everywhere instead of sometimes
using the Linux-specxific <sys/ucontext.h>.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The alignment specifier must appear before the typename
i.e. clang9 refused to compile
uint8_t alignas(MAX_ALIGN) __reserved[128];
but accepted
alignas(MAX_ALIGN) uint8_t __reserved[128];
|
|
|
|
|
|
| |
When set, unwind.h won't be copied to the installation directory. Some
platforms provide their own unwind.h that might conflict with the one
supplied with libunwind
|
|
|
|
| |
Use actual sizes from current kernels for the Windows abstraction layer
|
| |
|
|
|
|
|
| |
Add CMake file for Windows build
Enable Windows builds in Travis CI
|
|
|
|
|
|
|
|
| |
Add required unix style headers as a platform abstraction layer
This will allow compilation on Windows.
Simple single threaded implementation of the platform abstraction layer for
compilation on windows
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aux is a reserved filename on Windows. Presence of the directory
in the repo will prevent a git checkout on Windows.
The aux directory contained GPL code related to autotools,
it appears to not be directly referenced or necessary.
Assume it was a commit error. Remove it.
Add aux to the list of autotool releated ignores in
.gitignore
|
|
|
|
|
|
| |
Described in issue #176. Taken from Alpine Linux project.
Change __sigset_t to sigset_t
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix Gexpr macro warnings
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix errors observed while compiling libunwind for
UNW_REMOTE_ONLY,
library src,
amd64 & aarch64 with an amd64 MSVC compile, and
arm with an x86 MSVC compiler
Use standard compliant variadic macros
GNUC offer non-compliant variadic macros
Switch to standrds compiant variadic macros
Replace non-standard statement expression
GNUC statement expression is non-ISO C compliant
Where a simple inline function will be equivalent, use that instead
Gexpr.c support compilers w/o statement expressions
For this case a simple inline function would change semantics
Make a close approximation with a separate set of macros for non GNUC
Fix UNW_REMOTE_ONLY placement
Exclude function call not required for remote only builds
Fix __attribute__((packed))
On MSVC use pragma pack()
Add THREAD_LOCAL macro
Avoid bare use of __thread
Add MSVC fetch_and_add() support
Use macro ALIGNED(x) in place of __attribute__((aligned(x))
Rename local ltoa to avoid name collision
The Windows x86 SDK headers define ltoa.
Rename this local function to avoid a name collision.
ISO C doesn't allow empty structures
Add padding to allow empty arm/aarch64 structures to compile on MSVC
|
|
|
|
|
|
|
|
|
|
|
|
| |
```sh
$ cppcheck --enable=all . 2>&1 | grep -i -B5 -A5 leak
...
Checking src/tilegx/Gcreate_addr_space.c ...
src/tilegx/Gcreate_addr_space.c:52:5: error: Memory leak: as [memleak]
return NULL;
^
...
```
|
|
|
|
|
|
|
|
| |
found by cppcheck
[src/arm/Gex_tables.c:159] -> [src/arm/Gex_tables.c:155]: (warning) Either the condition 'buf!=NULL' is redundant or there is pointer arithmetic with NULL pointer.
Upstreamed from dotnet/coreclr#26869
|
|
|
|
|
|
|
|
| |
Introduced by #71
__reseverved needs to be big enough to store a unw_fpsimd_context_t
Which includes 32 128-bit registers, stored as 64 64-bit half registers.
Fix off by 2x issue
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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...
|