Browse Source

[debug] use clang debugtrap over asm

remotes/1785372757367212240/tmp_refs/heads/variable-page-size
Exverge 4 weeks ago
parent
commit
4b5533213b
No known key found for this signature in database GPG Key ID: DAD399BCC5FB77E4
  1. 6
      src/common/assert.cpp
  2. 2
      src/common/multi_level_page_table.inc
  3. 2
      src/core/arm/nce/arm_nce.cpp

6
src/common/assert.cpp

@ -17,12 +17,12 @@ void AssertFailSoftImpl() {
if (Settings::values.use_debug_asserts) { if (Settings::values.use_debug_asserts) {
Common::Log::Stop(); Common::Log::Stop();
#ifndef _MSC_VER #ifndef _MSC_VER
# if defined(ARCHITECTURE_x86_64)
# if __has_builtin(__builtin_debugtrap)
__builtin_debugtrap();
# elif defined(ARCHITECTURE_x86_64)
__asm__ __volatile__("int $3"); __asm__ __volatile__("int $3");
# elif defined(ARCHITECTURE_arm64) # elif defined(ARCHITECTURE_arm64)
__asm__ __volatile__("brk #0"); __asm__ __volatile__("brk #0");
# else
__builtin_debugtrap();
# endif # endif
#else // Clang/GCC ^^^ MSVC vvv #else // Clang/GCC ^^^ MSVC vvv
DebugBreak(); DebugBreak();

2
src/common/multi_level_page_table.inc

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2026 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project // SPDX-FileCopyrightText: 2021 yuzu Emulator Project

2
src/core/arm/nce/arm_nce.cpp

@ -455,7 +455,7 @@ HaltReason ArmNce::RunThread(Kernel::KThread* thread) {
#if defined(__APPLE__) #if defined(__APPLE__)
ASSERT(pthread_setspecific(ContextKey, &thread_params) == 0); ASSERT(pthread_setspecific(ContextKey, &thread_params) == 0);
#elif defined(_WIN32) #elif defined(_WIN32)
ASSERT_MSG(TlsSetValue(ContextKey, &thread_params) == 0, "Failed to set TLS value: id {}, error {}", ContextKey, GetLastError());
ASSERT_MSG(TlsSetValue(ContextKey, &thread_params), "Failed to set TLS value: id {}, error {}", ContextKey, GetLastError());
#endif #endif
// Move non-critical operations outside the locked section // Move non-critical operations outside the locked section

Loading…
Cancel
Save