forked from OSchip/llvm-project
2366c6adfc
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 |
||
---|---|---|
.. | ||
cmake | ||
docs | ||
include | ||
src | ||
test | ||
.clang-format | ||
CMakeLists.txt | ||
LICENSE.TXT |