1 //===------------------------ libunwind_ext.h -----------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 // 8 // Extensions to libunwind API. 9 // 10 //===----------------------------------------------------------------------===// 11 12 #ifndef __LIBUNWIND_EXT__ 13 #define __LIBUNWIND_EXT__ 14 15 #include "config.h" 16 #include <libunwind.h> 17 #include <unwind.h> 18 19 #define UNW_STEP_SUCCESS 1 20 #define UNW_STEP_END 0 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 // SPI 26 extern void unw_iterate_dwarf_unwind_cache(void (*func)(unw_word_t ip_start, 27 unw_word_t ip_end, 28 unw_word_t fde, 29 unw_word_t mh)); 30 31 // IPI 32 extern void _unw_add_dynamic_fde(unw_word_t fde); 33 extern void _unw_remove_dynamic_fde(unw_word_t fde); 34 35 #if defined(_LIBUNWIND_ARM_EHABI) 36 extern const uint32_t* decode_eht_entry(const uint32_t*, size_t*, size_t*); 37 extern _Unwind_Reason_Code _Unwind_VRS_Interpret(_Unwind_Context *context, 38 const uint32_t *data, 39 size_t offset, size_t len); 40 #endif 41 42 #ifdef __cplusplus 43 } 44 #endif 45 46 #endif // __LIBUNWIND_EXT__ 47