summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Port libunwind to FreeBSD/powerpc64.Piotr Kubaj2020-09-216-117/+248
|
* Fix unwinding of pre-linked librariesMikhail Durnev2020-09-214-8/+38
| | | | | | | | | | | 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>
* Use __linux__ define everywhere instead of __linuxMilian Wolff2020-09-0813-21/+21
| | | | | | | | | | | | | | | 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. ^ ```
* ia64: Fix dyn_info_list.S with newer binutilsJessica Clarke2020-08-041-1/+1
| | | | | | | | 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.
* Link Ltest-cxx-exceptions with libunwindAdrian Bunk2020-07-151-0/+1
| | | | | | | Bernhard Übelacker noticed that Ltest-cxx-exceptions was actually testing the gcc implementation due to not linking with libunwind. Fixes: #129
* linux: Use /proc/[pid]/rootMikhail Durnev2020-07-151-2/+32
| | | | | | | | 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>
* Undo unnecessary debug-related changeStephen Webb2020-07-021-21/+18
|
* Use NT_FILE to get backing file names if availableStephen Webb2020-07-028-45/+196
| | | | | 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-025-78/+293
| | | | | | 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.
* Make SHF_COMPRESSED use contingent on its existenceStephen Webb2020-07-021-0/+4
| | | | | | | | | | 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>
* Fix a typo caught by CIStephen Webb2020-06-181-1/+1
| | | | Fixed a missing conjunction on the mips target.
* Fix typo in a previous changeStephen Webb2020-06-181-1/+1
| | | | | Somehow a typo crept in in a previous change. You try and try but still can't win.
* Fix problems found in aarch64 buildStephen Webb2020-06-181-1/+5
| | | | Make an additional Linuxism dependent on building for Linux.
* Autodetect <sys/syscall.h>Stephen Webb2020-06-184-8/+11
| | | | | Use the system header <sys/syscall.h> only on those OS targets for which it is available.
* Handle <elf.h> that uses enums instead of definesStephen Webb2020-06-189-13/+35
| | | | | | | | | | 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.
* Rationalize endianness macrosStephen Webb2020-06-1821-101/+87
| | | | | | | | | 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.
* Consistently use POSIX <ucontext.h>Stephen Webb2020-06-186-6/+6
| | | | | Use the (former) POSIX-standard <ucontext.h> everywhere instead of sometimes using the Linux-specxific <sys/ucontext.h>.
* Fix typosSteve MacLean2020-06-183-3/+3
|
* Fix placement of alignas() specifierSteve MacLean2020-06-183-3/+3
| | | | | | | | | | | | 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];
* Added --disable-unwind-header optionPedro Navarro2020-06-182-1/+12
| | | | | | 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
* Fix Windows abstraction SIZEOF_*Steve MacLean2020-06-043-6/+29
| | | | Use actual sizes from current kernels for the Windows abstraction layer
* Fix Travis job matrixSteve MacLean2020-06-041-4/+6
|
* Add Windows build supportSteve MacLean2020-06-045-0/+420
| | | | | Add CMake file for Windows build Enable Windows builds in Travis CI
* Add simple Windows platform abstraction layerSteve MacLean2020-06-0413-0/+369
| | | | | | | | 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
* Add freebsd-elf* headers for WIndows compileSteve MacLean2020-06-043-0/+1362
|
* Remove aux directorySteve MacLean2020-06-044-7871/+1
| | | | | | | | | | | | | 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
* aarch64: Fix __sigset build issue on muslCDave Watson2020-05-271-1/+1
| | | | | | Described in issue #176. Taken from Alpine Linux project. Change __sigset_t to sigset_t
* Define UNW_EMPTY_STRUCT for non-GNUCSteve MacLean2020-05-212-2/+10
|
* Fix warningsSteve MacLean2020-05-211-2/+2
|
* Use C11 atomicsSteve MacLean2020-05-2161-312/+128
|
* Use C11 alignas(x)Steve MacLean2020-05-214-17/+7
|
* Use C11 _Thread_localSteve MacLean2020-05-2110-49/+17
|
* Only use one set of macros in Gexpr.cSteve MacLean2020-05-211-35/+1
| | | | Fix Gexpr macro warnings
* Remove #include compiler.h in public headerSteve MacLean2020-05-211-2/+12
|
* Fix MSVC UNW_REMOTE_ONLY compilation errorsSteve MacLean2020-05-2015-24/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix a memory leak issueAdeel2020-05-181-9/+8
| | | | | | | | | | | | ```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; ^ ... ```
* src/arm/Gex_tables.c: resolve possible null pointer dereferenceIlya Shipitsin2020-05-181-3/+3
| | | | | | | | 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
* Fix error in aarch64 unw_sigcontextSteve MacLean2020-05-181-1/+1
| | | | | | | | 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
* Fix off-by-one error in x86_64 stack framesJon Haslam2020-04-291-1/+1
|
* Reflect current status of Solaris x64 in the READMEAdeel2020-04-281-16/+2
|
* Update README to reflect Solaris x86-64 status w/ this PRJason King2020-04-281-1/+1
|
* Stop stepping on Solaris and illumos after reaching an IP of 0Jason King2020-04-281-0/+7
|
* Fix Gtest-trace output for illumos/SolarisJason King2020-04-281-1/+1
|
* Fix signal stacks on illumos/SolarisJason King2020-04-282-73/+51
|
* Add additional symbols to ignore on illumos and SolarisJason King2020-04-281-0/+5
|
* Treat PT_SUNW_UNWIND sections on illumos and Solaris as equivalent to ↵Jason King2020-04-282-0/+7
| | | | PT_GNU_EH_FRAME
* Update Gtest-bt for illumos and SolarisJason King2020-04-281-3/+3
|
* coredump: Unmap elf image before mapping another (#169)Hans-Christian Egtvedt2020-04-021-0/+4
| | | | | | | | 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>
* Bump version to 1.5-rc1v1.5-rc1Dave Watson2020-03-311-1/+1
|
* Fix compilation with -fno-common.Yichao Yu2020-03-3115-80/+89
| | | | | | | 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...