llvm-project/libunwind
Xing Xue 2366c6adfc [libunwind][AIX] Implement _Unwind_FindEnclosingFunction() using traceback table on AIX
Summary:
The implementation of  _Unwind_FindEnclosingFunction(void *ip) takes the context of itself and then uses the context to get the info of the function enclosing ip. This approach does not work for AIX because on AIX, the TOC base in GPR2 is used as the base for calculating relative addresses. Since  _Unwind_FindEnclosingFunction() may be in a different shared lib than the function containing ip, their TOC bases can be different. Therefore, using the value of GPR2 in the context from  _Unwind_FindEnclosingFunction() as the base results in incorrect addresses. On the other hand, the start address of a function is available in the traceback table following the instructions of each function on AIX. To get to the traceback table, search a word of 0 starting from ip and the traceback table is located after the word 0. This patch implements _Unwind_FindEnclosingFunction() for AIX by obtaining the function start address from its traceback table.

Reviewed by: compnerd, MaskRay, libunwind

Differential Revision: https://reviews.llvm.org/D131709
2022-08-12 18:07:56 -04:00
..
cmake [libunwind][CMake] Fix name of LIBUNWIND_SUPPORTS_NODEFAULTLIBS_FLAG 2022-05-27 09:20:57 +03:00
docs Update references to mailing lists that have moved to Discourse. 2022-07-28 16:54:58 -07:00
include [libunwind] Fix SEH unwinding on ARM 2022-06-06 23:23:35 +03:00
src [libunwind][AIX] Implement _Unwind_FindEnclosingFunction() using traceback table on AIX 2022-08-12 18:07:56 -04:00
test [libunwind] undef NDEBUG for assert.h in tests. 2022-08-04 19:55:40 -07:00
.clang-format
CMakeLists.txt [runtimes] Default LIB*_HERMETIC_STATIC_LIBRARY to ON on Windows 2022-05-18 20:31:51 +03:00
LICENSE.TXT