Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/pal/src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
#cmakedefine01 HAVE_BROKEN_FIFO_SELECT
#cmakedefine01 HAVE_BROKEN_FIFO_KEVENT
#cmakedefine01 UNWIND_CONTEXT_IS_UCONTEXT_T
#cmakedefine01 HAVE_GET_PROC_INFO_IN_RANGE
#cmakedefine01 HAVE_SCHED_GET_PRIORITY
#cmakedefine01 HAVE_WORKING_GETTIMEOFDAY
#cmakedefine01 HAVE_WORKING_CLOCK_GETTIME
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/pal/src/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ int main(int argc, char **argv)

check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC)
check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS)
check_symbol_exists(unw_get_proc_info_in_range libunwind.h HAVE_GET_PROC_INFO_IN_RANGE)

check_cxx_source_compiles("
#include <libunwind.h>
Expand Down
14 changes: 9 additions & 5 deletions src/coreclr/pal/src/exception/remote-unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,7 @@ StepWithCompactEncodingArm64(const libunwindInfo* info, compact_unwind_encoding_
if (!ReadCompactEncodingRegisterPair(info, &addr, &context->Lr, &context->Fp)) {
return false;
}
// Strip pointer authentication bits
// Strip pointer authentication bits
context->Lr &= MACOS_ARM64_POINTER_AUTH_MASK;
}
else
Expand Down Expand Up @@ -2328,7 +2328,13 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pip, int nee
}
}

#ifdef FEATURE_USE_SYSTEM_LIBUNWIND
#if HAVE_GET_PROC_INFO_IN_RANGE || !defined(HOST_UNIX)
return unw_get_proc_info_in_range(start_ip, end_ip, ehFrameHdrAddr, ehFrameHdrLen, exidxFrameHdrAddr, exidxFrameHdrLen, as, ip, pip, need_unwind_info, arg);
#else // HAVE_GET_PROC_INFO_IN_RANGE || !defined(HOST_UNIX)

// This branch is executed when using llvm-libunwind (macOS and similar platforms)
// or HP-libunwind version 1.6 and earlier.

if (ehFrameHdrAddr == 0) {
ASSERT("ELF: No PT_GNU_EH_FRAME program header\n");
return -UNW_EINVAL;
Expand Down Expand Up @@ -2400,9 +2406,7 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pip, int nee
}
info->FunctionStart = pip->start_ip;
return UNW_ESUCCESS;
#else
return unw_get_proc_info_in_range(start_ip, end_ip, ehFrameHdrAddr, ehFrameHdrLen, exidxFrameHdrAddr, exidxFrameHdrLen, as, ip, pip, need_unwind_info, arg);
#endif // FEATURE_USE_SYSTEM_LIBUNWIND
#endif // HAVE_GET_PROC_INFO_IN_RANGE || !defined(HOST_UNIX)

#endif // __APPLE__
}
Expand Down