diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-07-25 21:47:07 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-07-25 21:47:07 +0200 |
| commit | 58dee5330566d8948783eb2246ed4e4cde316068 (patch) | |
| tree | 571f841260c66e10c0df2232e333cad19a157734 /src/core/hle/kernel/svc/svc_exception.cpp | |
| parent | 7b13113fbec7e3d37d064f1d30fb72a8a65467cc (diff) | |
[fmt] use {#:x} instead of 0x{:#x} (#4170)
continuation of #309 but applying to even more files than before :)
also makes them lowercase because `0xfafafa` is better as `0XFAFAFA`
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4170
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Diffstat (limited to 'src/core/hle/kernel/svc/svc_exception.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc/svc_exception.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/core/hle/kernel/svc/svc_exception.cpp b/src/core/hle/kernel/svc/svc_exception.cpp index e1b0fa7b95..4f214c6142 100644 --- a/src/core/hle/kernel/svc/svc_exception.cpp +++ b/src/core/hle/kernel/svc/svc_exception.cpp @@ -4,6 +4,7 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include <cctype> #include "core/core.h" #include "core/debugger/debugger.h" #include "core/hle/kernel/k_process.h" @@ -41,7 +42,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) { std::string hexdump; for (std::size_t i = 0; i < debug_buffer.size(); i++) { hexdump += fmt::format("{:02X} ", debug_buffer[i]); - if (i != 0 && i % 16 == 0) { + if ((i + 1) % 32 == 0) { hexdump += '\n'; } } @@ -51,35 +52,35 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) { }; switch (break_reason) { case BreakReason::Panic: - LOG_CRITICAL(Debug_Emulated, "Userspace PANIC! info1=0x{:016X}, info2=0x{:016X}", info1, + LOG_CRITICAL(Debug_Emulated, "Userspace PANIC! info1={:#016x}, info2={:#016x}", info1, info2); handle_debug_buffer(info1, info2); break; case BreakReason::Assert: - LOG_CRITICAL(Debug_Emulated, "Userspace Assertion failed! info1=0x{:016X}, info2=0x{:016X}", + LOG_CRITICAL(Debug_Emulated, "Userspace Assertion failed! info1={:#016x}, info2={:#016x}", info1, info2); handle_debug_buffer(info1, info2); break; case BreakReason::User: - LOG_WARNING(Debug_Emulated, "Userspace Break! 0x{:016X} with size 0x{:016X}", info1, info2); + LOG_WARNING(Debug_Emulated, "Userspace Break! {:#016x} with size {:#016x}", info1, info2); handle_debug_buffer(info1, info2); break; case BreakReason::PreLoadDll: LOG_INFO(Debug_Emulated, - "Userspace Attempting to load an NRO at 0x{:016X} with size 0x{:016X}", info1, + "Userspace Attempting to load an NRO at {:#016x} with size {:#016x}", info1, info2); break; case BreakReason::PostLoadDll: - LOG_INFO(Debug_Emulated, "Userspace Loaded an NRO at 0x{:016X} with size 0x{:016X}", info1, + LOG_INFO(Debug_Emulated, "Userspace Loaded an NRO at {:#016x} with size {:#016x}", info1, info2); break; case BreakReason::PreUnloadDll: LOG_INFO(Debug_Emulated, - "Userspace Attempting to unload an NRO at 0x{:016X} with size 0x{:016X}", info1, + "Userspace Attempting to unload an NRO at {:#016x} with size {:#016x}", info1, info2); break; case BreakReason::PostUnloadDll: - LOG_INFO(Debug_Emulated, "Userspace Unloaded an NRO at 0x{:016X} with size 0x{:016X}", + LOG_INFO(Debug_Emulated, "Userspace Unloaded an NRO at {:#016x} with size {:#016x}", info1, info2); break; case BreakReason::CppException: @@ -88,7 +89,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) { default: LOG_WARNING( Debug_Emulated, - "Signalling debugger, Unknown break reason {:#X}, info1=0x{:016X}, info2=0x{:016X}", + "Signalling debugger, Unknown break reason {:#x}, info1={:#016x}, info2={:#016x}", reason, info1, info2); handle_debug_buffer(info1, info2); break; @@ -101,7 +102,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) { if (!notification_only) { LOG_CRITICAL( Debug_Emulated, - "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}", + "Emulated program broke execution! reason={:#016x}, info1={:#016x}, info2={:#016x}", reason, info1, info2); handle_debug_buffer(info1, info2); |
