aboutsummaryrefslogtreecommitdiff
path: root/libunwind
AgeCommit message (Collapse)AuthorFilesLines
2023-07-19[libunwind] Fix build error on 32 bit Arm after -Wcast-qual was addedDavid Spickett1-1/+1
New warning was added in https://reviews.llvm.org/D153911 which caused: https://buildkite.com/llvm-project/libcxx-ci/builds/28407#01896b79-2a5e-4554-ac31-2abec5a8b281 ../../libunwind/src/UnwindLevel1-gcc-ext.c:172:47: error: cast from 'const unsigned int *' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] ex.pr_cache.ehtp = (_Unwind_EHT_Header *) unwindInfo; I don't see any reason there should be a const here in the first place, so just remove it. Reviewed By: #libunwind, michaelplatings, MaskRay Differential Revision: https://reviews.llvm.org/D155685
2023-06-29[libunwind] Add cached compile and link flags to libunwindmgrzywac2-0/+8
Add flags allowing to use compile flags and libraries provided in cache with libunwind. Similar flags are already present in libc++ and libc++abi CMakeLists files. Differential Revision: https://reviews.llvm.org/D150252
2023-06-05[libunwind] Removes CMake work-arounds.Mark de Wever1-8/+0
CMake older than 3.20.0 is no longer supported. This removes work-arounds for no longer supported versions. Reviewed By: #libunwind, mstorsjo Differential Revision: https://reviews.llvm.org/D152100
2023-05-27Reland "[CMake] Bumps minimum version to 3.20.0.Mark de Wever2-3/+2
This reverts commit d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6. Adds the patch by @hans from https://github.com/llvm/llvm-project/issues/62719 This patch fixes the Windows build. d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 reverted the reviews D144509 [CMake] Bumps minimum version to 3.20.0. This partly undoes D137724. This change has been discussed on discourse https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193 Note this does not remove work-arounds for older CMake versions, that will be done in followup patches. D150532 [OpenMP] Compile assembly files as ASM, not C Since CMake 3.20, CMake explicitly passes "-x c" (or equivalent) when compiling a file which has been set as having the language C. This behaviour change only takes place if "cmake_minimum_required" is set to 3.20 or newer, or if the policy CMP0119 is set to new. Attempting to compile assembly files with "-x c" fails, however this is workarounded in many cases, as OpenMP overrides this with "-x assembler-with-cpp", however this is only added for non-Windows targets. Thus, after increasing cmake_minimum_required to 3.20, this breaks compiling the GNU assembly for Windows targets; the GNU assembly is used for ARM and AArch64 Windows targets when building with Clang. This patch unbreaks that. D150688 [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump The build uses other mechanism to select the runtime. Fixes #62719 Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D151344
2023-05-25[NFC][Py Reformat] Reformat python files in libcxx/libcxxabiTobias Hieta2-68/+69
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black`. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Reviewed By: #libc, kwk, Mordante Differential Revision: https://reviews.llvm.org/D150763
2023-05-17Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""Nico Weber2-2/+3
This reverts commit 65429b9af6a2c99d340ab2dcddd41dab201f399c. Broke several projects, see https://reviews.llvm.org/D144509#4347562 onwards. Also reverts follow-up commit "[OpenMP] Compile assembly files as ASM, not C" This reverts commit 4072c8aee4c89c4457f4f30d01dc9bb4dfa52559. Also reverts fix attempt "[cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump" This reverts commit 7d47dac5f828efd1d378ba44a97559114f00fb64.
2023-05-13Reland "[CMake] Bumps minimum version to 3.20.0."Mark de Wever2-3/+2
The owner of the last two failing buildbots updated CMake. This reverts commit e8e8707b4aa6e4cc04c0cffb2de01d2de71165fc.
2023-05-06[libunwind] Unwind through Linux riscv sigreturn trampolineFeng Wang3-3/+62
Similar to D90898 (Linux AArch64) and D124765 (SystemZ). On an Arch Linux RISC-V (riscv64gc), the following code ``` #define _GNU_SOURCE #include <dlfcn.h> #include <libunwind.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> static void handler(int signo) { unw_context_t context; unw_cursor_t cursor; unw_getcontext(&context); unw_init_local(&cursor, &context); unw_word_t pc, sp; do { unw_get_reg(&cursor, UNW_REG_IP, &pc); unw_get_reg(&cursor, UNW_REG_SP, &sp); printf("pc=0x%016zx sp=0x%016zx", (size_t)pc, (size_t)sp); Dl_info info = {}; if (dladdr((void *)pc, &info)) printf(" %s:%s", info.dli_fname, info.dli_sname ? info.dli_sname : ""); puts(""); } while (unw_step(&cursor) > 0); exit(0); } int main() { signal(SIGUSR1, handler); raise(SIGUSR1); return 1; } ``` linked with `-Wl,--export-dynamic` gives an output like ``` pc=0x0000000000010a82 sp=0x00007fffd8a0b910 ./b: pc=0x00007fffa7e77800 sp=0x00007fffd8a0c520 linux-vdso.so.1:__vdso_rt_sigreturn pc=0x00007fffa7d73bee sp=0x00007fffd8a0c960 /usr/lib/libc.so.6: pc=0x00007fffa7d3ed66 sp=0x00007fffd8a0c9b0 /usr/lib/libc.so.6:gsignal pc=0x0000000000010a3c sp=0x00007fffd8a0c9c0 ./b:main pc=0x00007fffa7d2f1d4 sp=0x00007fffd8a0c9e0 /usr/lib/libc.so.6: pc=0x00007fffa7d2f27c sp=0x00007fffd8a0cb10 /usr/lib/libc.so.6:__libc_start_main pc=0x00000000000109a0 sp=0x00007fffd8a0cb60 ./b:_start ``` Co-Authored-By: Fangrui Song <i@maskray.me> Reviewed By: #libunwind, MaskRay Differential Revision: https://reviews.llvm.org/D148499
2023-05-06Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""Mark de Wever2-2/+3
Unfortunatly not all buildbots are updated. This reverts commit ffb807ab5375b3f78df198dc5d4302b3b552242f.
2023-05-06Reland "[CMake] Bumps minimum version to 3.20.0."Mark de Wever2-3/+2
All build bots should be updated now. This reverts commit 44d38022ab29a3156349602733b3459df5beef93.
2023-04-27[libcxx] [test] Prepend to PATH instead of overriding itMartin Storsjö1-1/+1
On Windows, the PATH env variable is used for locating dynamically linked librarys, akin to LD_LIBRARY_PATH on Linux. The tests that run with a dynamically linked libc++ used "--env PATH=%{lib}" in the test config. This had the unfortunate side effect of making other tools from PATH unavailable during the runtime of the tests; in particular, it caused the "executor-has-no-bash" flag to be set for all those Windows test configs (with the clang-cl static config being the only one lacking it). Thus, this increases the number of tests actually included in the clang-cl dll and all mingw test configs by 9 tests. The clang-cl static test configuration has been executing those tests since the "--env PATH=%{lib}" was removed from that test config in e78223e79efc886ef6f0ea5413deab3737d6d63b. (For mingw we haven't had a need to split the test config between shared and static, which means that the mingw static test config previously ran with --env PATH needlessly.) This increases the test coverage for patches like D146398 which can't be executed in the executor-has-no-bash configs. Change the default value of the arg.env to an empty array; when we do pass values to the option, they get passed as an array of strings, so make sure the variable behaves consistently when no arguments have been passed. Differential Revision: https://reviews.llvm.org/D148324
2023-04-23[test] Simplify libunwind REQUIRESFangrui Song3-3/+3
2023-04-22[libunwind] [SEH] Clear DISPATCHER_CONTEXT when initializing a cursorMartin Storsjö1-0/+2
We only initialize a few fields in DISPATCHER_CONTEXT - don't leave the rest in an uninitialized state; make sure the whole struct is in a deterministic state. This makes nondeterministic failures deterministic, for some cases relating to forced unwinding on aarch64/arm (which requires filling in parsing of the xdata for finding the exception handler and LSDA). Differential Revision: https://reviews.llvm.org/D148660
2023-04-19[libunwind] [SEH] Add debug logging in __libunwind_seh_personalityMartin Storsjö1-0/+8
Differential Revision: https://reviews.llvm.org/D148659
2023-04-18[libunwind] Remove the legacy Unwind_AppleExtras.cppLouis Dionne2-126/+0
Unwind_AppleExtras.cpp contained annotations telling the linker that some symbols are not available on some very old platforms. However, those platforms are not supported anymore, so the annotations are not used. Why remove this? In addition to cleaning up the code base, this also removes the possibility of implementing those annotations incorrectly (which was the case previously), which could lead to important symbols being hidden when they should have been visible. Differential Revision: https://reviews.llvm.org/D148445
2023-04-15Revert "Revert "Revert "[CMake] Bumps minimum version to 3.20.0."""Mark de Wever2-2/+3
This reverts commit 1ef4c3c859728008cf707cad8d67f45ae5070ae1. Two buildbots still haven't been updated.
2023-04-15Revert "Revert "[CMake] Bumps minimum version to 3.20.0.""Mark de Wever2-3/+2
This reverts commit 92523a35a827539db8557bbc3ecab7f9ea3f6ade. Reland to see whether CIs are updated.
2023-04-15[libunwind] Sync Unwind_AppleExtras.cpp with downstream versionLouis Dionne1-7/+15
Both had diverged in a few ways, so this brings them both back in sync. Differential Revision: https://reviews.llvm.org/D148351
2023-04-13[libunwind] [SEH] Initialize _msContext with RtlCaptureContextMartin Storsjö1-0/+1
When we initialize the UnwindCursor (unw_cursor_t) based on an existing Registers object (unw_context_t), we only initialize a subset of the class. Fill the struct properly for the current thread with RtlCaptureContext, followed by overwriting of the subset of registers that we do have available in the Registers class. One might think that it's enough to initialize specifically the registers that we signal availability for with ContextFlags, however in practice, that's not enough. This fixes crashes when restoring the context via RtlRestoreContext (via UnwindCursor::jumpto), via __unw_resume. Differential Revision: https://reviews.llvm.org/D147636
2023-04-13[libunwind] [SEH] Allow setting/getting the register UNW_X86_64_RIPMartin Storsjö1-1/+3
This fixes libunwind_01.pass.cpp for x86_64 Windows. Differential Revision: https://reviews.llvm.org/D147635
2023-04-11[libcxxabi, libunwind] [test] Place output from tests under a 'test' subdirMartin Storsjö1-1/+1
Previously, all the output from the tests were placed directly in the build directory. The tests produce a couple directories named `__config_{exec,cache,src}__` which are easy to distinguish, and the output from the individual tests were placed directly in a directory named `Output`. This is the same change as 736c6e246f5398331d83edd204a846cc967ad5c6, but for the libcxxabi and libunwind test suites. Differential Revision: https://reviews.llvm.org/D147628
2023-04-11[libunwind] [test] Mark the signal_frame test as unsupported on WindowsMartin Storsjö1-0/+4
Mark it as unsupported on x86_64, arm and aarch64. On i686, DWARF is used as the default unwinding format, and there, the CFI directives are supported. Differential Revision: https://reviews.llvm.org/D147858
2023-04-11[libunwind] [SEH] Handle ExceptionContinueExecution in forced unwindingMartin Storsjö1-0/+9
This fixes the libcxxabi test force_unwind3.pass.cpp when run on native Windows. When unwinding past the main thread function into the system functions that brought up the thread, we can hit functions whose personality functions return ExceptionContinueExecution (instead of the regular ExceptionContinueSearch). Interpret this as a signal to stop the unwind. Curiously, in this case, it does return ExceptionContinueSearch if running within a debugger. Differential Revision: https://reviews.llvm.org/D147739
2023-04-11[libunwind] [SEH] Sync LSDA and handler between unw_proc_info_t and ↵Martin Storsjö1-1/+11
DISPATCHER_CONTEXT For normal C++ unwinding, we get _dispContext initialized by the prepopulated DISPATCHER_CONTEXT in _GCC_specific_handler, which we set with __unw_seh_set_disp_ctx. When doing force unwinding, we step and populate the unw_proc_info_t struct _info with getInfoFromSEH, but when we execute the handler via the __libunwind_seh_personality wrapper function, we execute the handler set in DISPATCHER_CONTEXT. Whenever updating these fields in either _info or _dispContext, sync them to the other one too. This fixes one aspect of the libcxxabi force_unwind*.pass.cpp tests on x86_64. Differential Revision: https://reviews.llvm.org/D147637
2023-04-11[libunwind] Increase the external value of _LIBUNWIND_CURSOR_SIZE for SEH/x86_64Martin Storsjö1-1/+1
For x86_64 Windows targets (that use SEH), _LIBUNWIND_CURSOR_SIZE is 204; this fixes corruption in test cases that include libunwind.h without manually defining _LIBUNWIND_IS_NATIVE_ONLY. If the libunwind.h header is included without defining _LIBUNWIND_IS_NATIVE_ONLY (like in the libunwind test cases), the sizes are set to accommodate the maximum possible cursors and contexts. (Alternatively, __libunwind_config.h should be changed to default to native unwinding unless cross unwinding has been requested. Cross unwinding isn't implemented as far as I know anyway.) Differential Revision: https://reviews.llvm.org/D147634
2023-04-07[libunwind][LoongArch] Restore $r1 before $r4 in `jumpto`Weining Lu2-7/+2
$ra should be restored before $a0, otherwise the baseaddress ($a0) would be destroyed. See file `UnwindRegistersSave.S` for reference. This also makes libcxx and libcxxabi regtest pass for the `-DLIBCXXABI_USE_LLVM_UNWINDER=ON` build. Reviewed By: MaskRay, xen0n, #libunwind Differential Revision: https://reviews.llvm.org/D147372
2023-04-07[libunwind][test] Add test to check for unw_resume()zhanglimin1-0/+39
This is here for local unwinding, which unw_resume() restores the machine state and then directly resumes execution in the target stack frame. Reviewed By: wangleiat Differential Revision: https://reviews.llvm.org/D147371
2023-04-06[libunwind] [test] Add a mingw specific test config fileMartin Storsjö2-1/+28
This matches how it is done for libcxx and libcxxabi. Differential Revision: https://reviews.llvm.org/D147633
2023-04-06[libunwind] Fflush stderr after each log messageMartin Storsjö1-4/+8
In most configs, stderr is line buffered by default, but in some cases on Windows (running in git bash, or running in Wine) stderr can end up fully buffered. See 2ec75a0869ab01fa9caf310e8a31eb7716182d30 for a similar change for the output from lit itself. This has no effect on libunwind when the log messages aren't enabled via the environment variables. Differential Revision: https://reviews.llvm.org/D147632
2023-04-06[libunwind] Fix a typo in a debug log message. NFC.Martin Storsjö3-3/+3
This typo (unw_step instead of unw_get_proc_info) has been around since the initial public commit of libunwind. Differential Revision: https://reviews.llvm.org/D147631
2023-04-06[libcxxabi, libunwind] [test] Quote the python path properly for LIB*_EXECUTORMartin Storsjö1-1/+1
This is the same as c218c80c730a14a1cbcebd588b18220a879702c6, but for libcxxabi and libunwind. This fixes running tests on Windows with Python installed in e.g. "C:\Program Files\Python38". Differential Revision: https://reviews.llvm.org/D147629
2023-04-05[libunwind] Fix a case of inconsistent indentation. NFC.Martin Storsjö1-1/+1
2023-03-30[libc++] Use the stdlib=<LIB> Lit feature instead of use_system_cxx_libLouis Dionne2-1/+3
The use_system_cxx_lib Lit feature was only used for back-deployment testing. However, one immense hole in that setup was that we didn't have a proper way to test Apple's own libc++ outside of back-deployment, which was embodied by the fact that we needed to define _LIBCPP_DISABLE_AVAILABILITY when testing (see change in libcxx/utils/libcxx/test/params.py). This led to the apple-system testing configuration not checking for availability markup, which is obviously quite bad since the library we ship actually has availability markup. Using stdlib=<VENDOR>-libc++ instead to encode back-deployment restrictions on tests is simpler and it makes it possible to naturally support tests such as availability markup checking even in the tip-of-trunk Apple-libc++ configuration. Differential Revision: https://reviews.llvm.org/D146366
2023-03-20[libunwind][Modules] Add unwind_arm_ehabi.h and unwind_itanium.h to the ↵Ian Anderson2-2/+5
unwind module) Add unwind_arm_ehabi.h and unwind_itanium.h to the unwind module and use angle includes to include them. Reviewed By: ldionne, #libunwind Differential Revision: https://reviews.llvm.org/D144323
2023-03-18Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""Mark de Wever2-2/+3
This reverts commit a72165e5df59032cdd54dcb18155f2630d73abd1. Some buildbots have not been updated yet.
2023-03-18Reland "[CMake] Bumps minimum version to 3.20.0."Mark de Wever2-3/+2
This reverts commit 92523a35a827539db8557bbc3ecab7f9ea3f6ade. Test whether all CI runners are updated.
2023-03-17[libunwind][AArch64] Unbreak building with GNU assemblerXi Ruoyao1-1/+2
GNU assembler mandates armv8.5-a for memtag instructions. Maybe we should remove this restriction in GNU assembler, but let's work around it for current GNU Binutils releases. Differential Revision: https://reviews.llvm.org/D146109
2023-03-17[runtimes] Synchronize warnings flags between libc++/libc++abi/libunwindNikolas Klauser2-34/+4
This mostly keeps the same warning flags. The most important exceptions are `-Wpedantic` and `-Wconversion`, which are now removed from libc++abi and libunwind. Reviewed By: ldionne, #libunwind, #libc, #libc_abi Spies: mikhail.ramalho, phosek, libcxx-commits Differential Revision: https://reviews.llvm.org/D144252
2023-03-15[libunwind][RISC-V] Rewrite testcase with C as possible.Kito Cheng1-24/+14
Fix #60472 The testcase is writen in all inline asm but it seems not well maintained for the CFI directive, of cause we can fix that, but this patch also contain another issue is it use s0 and s1 without store/restore. This patch proposed another way to testing that, use inline asm to generate dummy def and use, so compiler will generate store/restore for the vector register, and then generate the CFI directives. Also check __riscv_vector as the testcase guard, because the testcase will read vlenb which is only available when V or zve* extensions is present. Reviewed By: MaskRay, asb, #libunwind Differential Revision: https://reviews.llvm.org/D145225
2023-03-04Revert "[CMake] Bumps minimum version to 3.20.0."Mark de Wever2-2/+3
Some build bots have not been updated to the new minimal CMake version. Reverting for now and ping the buildbot owners. This reverts commit 44c6b905f8527635e49bb3ea97dea315f92d38ec.
2023-03-04[CMake] Bumps minimum version to 3.20.0.Mark de Wever2-3/+2
This partly undoes D137724. This change has been discussed on discourse https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193 Note this does not remove work-arounds for older CMake versions, that will be done in followup patches. Reviewed By: mehdi_amini, MaskRay, ChuanqiXu, to268, thieta, tschuett, phosek, #libunwind, #libc_vendors, #libc, #libc_abi, sivachandra, philnik, zibi Differential Revision: https://reviews.llvm.org/D144509
2023-02-22Revert "[CMake] Unify llvm_check_linker_flag and ↵Petr Hosek1-4/+4
llvm_check_compiler_linker_flag" This reverts commit efae3174f09560353fb0f3d528bcbffe060d5438 since it broke the standalone Flang build.
2023-02-22[CMake] Unify llvm_check_linker_flag and llvm_check_compiler_linker_flagPetr Hosek1-4/+4
These have the same purposes but two different implementations. llvm_check_compiler_linker_flag uses CMAKE_REQUIRED_FLAGS which affects flags used both for compilation and linking which is problematic because some flags may be link-only and trigger unused argument warning when set during compilation. llvm_check_linker_flag does not have this issue so we chose it as the prevailaing implementation. Differential Revision: https://reviews.llvm.org/D143052
2023-02-22[runtimes] Remove unused functions from Handle{Libcxx,Libunwind}Flags.cmakeNikolas Klauser1-37/+0
Reviewed By: phosek, #libunwind, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D144400
2023-02-21[runtimes] Remove add_target_flags* functions and use add_flags* insteadNikolas Klauser1-31/+0
Reviewed By: phosek, #libunwind, #libc, #libc_abi Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D144398
2023-02-21[runtimes] Move common functions from ↵Nikolas Klauser2-112/+2
Handle{Libcxx,Libcxxabi,Libunwind}Flags.cmake to runtimes/cmake/Modules/HandleFlags.cmake Reviewed By: phosek, #libunwind, #libc, #libc_abi Spies: arichardson, libcxx-commits Differential Revision: https://reviews.llvm.org/D144395
2023-02-16[libunwind][PowerPC] Fix saving/restoring VSX registers on LE systemsNemanja Ivanovic2-0/+29
Currently, libunwind just uses stxvd2x/lxvd2x to save/restore VSX registers respectively. This puts the registers in doubleword-reversed order into memory on little endian systems. If both the save and restore are done the same way, this isn't a problem. However if the unwinder is just restoring a callee-saved register, it will restore it in the wrong order (since function prologues save them in the correct order). This patch adds the necessary swaps before the saves and after the restores. Differential revision: https://reviews.llvm.org/D137599
2023-02-14[runtimes] Remove duplicate imports of libcxx.test.configLouis Dionne5-5/+5
2023-02-14[runtimes] Rename newconfig.py to config.py -- it's not new anymoreLouis Dionne5-11/+11
Differential Revision: https://reviews.llvm.org/D144031
2023-02-10[libunwind] On Darwin, add a callback-based lookup scheme for JIT'd unwind info.Lang Hames3-0/+165
This commit adds support for a new callback-based lookup scheme for unwind info that was inspired by the `_dyld_find_unwind_info_sections` SPI that libunwind uses to find unwind-info in non-JIT'd frames. From llvm-project/libunwind/src/AddressSpace.hpp: ``` struct dyld_unwind_sections { const struct mach_header* mh; const void* dwarf_section; uintptr_t dwarf_section_length; const void* compact_unwind_section; uintptr_t compact_unwind_section_length; }; extern bool _dyld_find_unwind_sections(void *, dyld_unwind_sections *); ``` During unwinding libunwind calls `_dyld_find_unwind_sections` to both find unwind section addresses and identify the subarchitecture for frames (via the MachO-header pointed to by the mh field). This commit introduces two new libunwind SPI functions: ``` struct unw_dynamic_unwind_sections { unw_word_t dso_base; unw_word_t dwarf_section; size_t dwarf_section_length; unw_word_t compact_unwind_section; size_t compact_unwind_section_length; }; typedef int (*unw_find_dynamic_unwind_sections)( unw_word_t addr, struct unw_dynamic_unwind_sections *info); // Returns UNW_ESUCCESS if successfully registered, UNW_EINVAL for duplicate // registrations, and UNW_ENOMEM to indicate too many registrations. extern int __unw_add_find_dynamic_unwind_sections( unw_find_dynamic_unwind_sections find_dynamic_unwind_sections); // Returns UNW_ESUCCESS if successfully deregistered, UNW_EINVAL to indicate // no such registration. extern int __unw_remove_find_dynamic_unwind_sections( unw_find_dynamic_unwind_sections find_dynamic_unwind_sections); ``` These can be used to register and deregister callbacks that have a similar signature to `_dyld_find_unwind_sections`. During unwinding if `_dyld_find_unwind_sections` returns false (indicating that no frame info was found by dyld) then registered callbacks are run in registration order until either the unwind info is found or the end of the list is reached. With this commit, and by implementing the find-unwind-info callback in the ORC runtime in LLVM, we (1) enable support for registering JIT'd compact-unwind info with libunwind*, (2) provide a way to identify the subarchitecture for each frame (by returning a pointer to a JIT'd MachO header), and (3) delegate tracking of unwind info to the callback, which may be able to implement more efficient address-based lookup than libunwind. * JITLink does not process or register compact unwind info yet, so this patch does not fully enable compact unwind info in ORC, it simply provides some necessary plumbing. JITLink support for compact unwind should land some time in the LLVM 17 development cycle. Reviewed By: pete Differential Revision: https://reviews.llvm.org/D142176