Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
249e384ba4
commit
59059398a2
2 changed files with 4 additions and 19 deletions
14
externals/CMakeLists.txt
vendored
14
externals/CMakeLists.txt
vendored
|
@ -47,20 +47,6 @@ endif()
|
|||
# Glad
|
||||
add_subdirectory(glad)
|
||||
|
||||
# mbedtls
|
||||
# TODO(crueter): Findmbedtls that ONLY accepts mbedtls2
|
||||
AddJsonPackage(mbedtls)
|
||||
|
||||
if (mbedtls_ADDED)
|
||||
target_include_directories(mbedtls PUBLIC ${mbedtls_SOURCE_DIR}/include)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(mbedcrypto PRIVATE
|
||||
-Wno-unused-but-set-variable
|
||||
-Wno-string-concatenation)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# libusb
|
||||
if (ENABLE_LIBUSB)
|
||||
add_subdirectory(libusb)
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <functional>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <lock_guard>
|
||||
#include <shared_mutex>
|
||||
#include <optional>
|
||||
#include <ankerl/unordered_dense.h>
|
||||
|
@ -121,10 +120,10 @@ void SigHandler::SigAction(int sig, siginfo_t* info, void* raw_context) {
|
|||
CTX_DECLARE(raw_context);
|
||||
#if defined(ARCHITECTURE_x86_64)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(sig_handler->code_block_infos_mutex);
|
||||
std::shared_lock<std::shared_mutex> guard(sig_handler->code_block_infos_mutex);
|
||||
const auto iter = sig_handler->FindCodeBlockInfo(CTX_RIP);
|
||||
if (iter != sig_handler->code_block_infos.end()) {
|
||||
FakeCall fc = iter->cb(CTX_RIP);
|
||||
FakeCall fc = iter->second.cb(CTX_RIP);
|
||||
CTX_RSP -= sizeof(u64);
|
||||
*mcl::bit_cast<u64*>(CTX_RSP) = fc.ret_rip;
|
||||
CTX_RIP = fc.call_rip;
|
||||
|
@ -134,10 +133,10 @@ void SigHandler::SigAction(int sig, siginfo_t* info, void* raw_context) {
|
|||
fmt::print(stderr, "Unhandled {} at rip {:#018x}\n", sig == SIGSEGV ? "SIGSEGV" : "SIGBUS", CTX_RIP);
|
||||
#elif defined(ARCHITECTURE_arm64)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(sig_handler->code_block_infos_mutex);
|
||||
std::shared_lock<std::shared_mutex> guard(sig_handler->code_block_infos_mutex);
|
||||
const auto iter = sig_handler->FindCodeBlockInfo(CTX_PC);
|
||||
if (iter != sig_handler->code_block_infos.end()) {
|
||||
FakeCall fc = iter->cb(CTX_PC);
|
||||
FakeCall fc = iter->second.cb(CTX_PC);
|
||||
CTX_PC = fc.call_pc;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue