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
6 changes: 2 additions & 4 deletions core/libs/prx/libc/include/exceptions/Unwind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
#include "prx/libc/include/General.hpp"
#include "prx/libc/include/specifics/itanium/UnwindAbi.hpp"

namespace LibcUnwind {
extern const std::uintptr_t CursorSlots[];
}
extern "C" const std::uintptr_t* UnwindCursorSlots_nid_no_patch();

struct _Unwind_Context {
const std::uintptr_t* cursor = LibcUnwind::CursorSlots;
const std::uintptr_t* cursor = UnwindCursorSlots_nid_no_patch();
std::uintptr_t registers[17] {};
#ifdef _WIN32
std::uintptr_t vectorRegisters[16][2] {};
Expand Down
6 changes: 4 additions & 2 deletions core/libs/prx/libc/src/exception/Unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ void APS5_VABI CursorUnsupported(_Unwind_Context*) {
template<class Function> std::uintptr_t Slot(Function function) {
return reinterpret_cast<std::uintptr_t>(function);
}
}

namespace LibcUnwind {
const std::uintptr_t CursorSlots[] = {
Slot(&CursorUnsupported),
Slot(&CursorUnsupported),
Expand All @@ -86,6 +84,10 @@ const std::uintptr_t CursorSlots[] = {
};
}

const std::uintptr_t* UnwindCursorSlots_nid_no_patch() {
return CursorSlots;
}

#if defined(__linux__) || defined(_WIN32) || defined(__APPLE__)

extern "C" _Unwind_Reason_Code __gxx_personality_v0(int, _Unwind_Action, std::uint64_t, _Unwind_Exception*, _Unwind_Context*);
Expand Down
Loading