aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-27 12:52:40 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-27 12:52:40 -0400
commitf4a889a14c20d8b2b71d4154c0ba7d31acb5f6a0 (patch)
treeecbaff944318b0628a567450fd14faca6823e3e2 /src/core/hle/kernel
parent017db199f45384d2889e1a5dcc0ca6f0fff3aa8b (diff)
kernel: optional SVC trace (EDEN_NX2_SVC_TRACE=1)
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/svc.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 3542d5a3b6..d2e45fabb6 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -6,6 +6,7 @@
// This file is automatically generated using svc_generator.py.
// DO NOT MODIFY IT MANUALLY
+#include <cstdlib>
#include <type_traits>
#include "core/arm/arm_interface.h"
@@ -2505,11 +2506,21 @@ void Call(Core::System& system, u32 imm) {
LOG_TRACE(Kernel_SVC, "{} [0]={:#x} [1]={:#x} [2]={:#x} [3]={:#x} [4]={:#x} [5]={:#x} [6]={:#x}",
imm, GetArg64(args, 0), GetArg64(args, 1), GetArg64(args, 2),
GetArg64(args, 3), GetArg64(args, 4), GetArg64(args, 5), GetArg64(args, 6));
+ // Set EDEN_NX2_SVC_TRACE=1 to log every SVC with its arguments and results.
+ static const bool svc_trace = std::getenv("EDEN_NX2_SVC_TRACE") != nullptr;
+ if (svc_trace) {
+ LOG_INFO(Kernel_SVC, "svc {:#04x} in [0]={:#x} [1]={:#x} [2]={:#x} [3]={:#x}", imm,
+ GetArg64(args, 0), GetArg64(args, 1), GetArg64(args, 2), GetArg64(args, 3));
+ }
if (process.Is64Bit()) {
Call64(system, imm, args);
} else {
Call32(system, imm, args);
}
+ if (svc_trace) {
+ LOG_INFO(Kernel_SVC, "svc {:#04x} out [0]={:#x} [1]={:#x} [2]={:#x}", imm,
+ GetArg64(args, 0), GetArg64(args, 1), GetArg64(args, 2));
+ }
//kernel.ExitSVCProfile();
kernel.CurrentPhysicalCore().LoadSvcArguments(process, args);
}