From 9a7cc43d81d64c3dd0010ef93b4d2dbdd9ddb49a Mon Sep 17 00:00:00 2001 From: PabloMK7 Date: Wed, 11 Mar 2026 13:49:39 +0100 Subject: [PATCH] core: kernel: Set debug thread name based on process name (#1859) --- src/core/hle/kernel/svc.cpp | 2 +- src/core/hle/kernel/thread.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 58530f494..77fdf422a 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1308,7 +1308,7 @@ Result SVC::CreateThread(Handle* out_handle, u32 entry_point, u32 arg, VAddr sta } // Create thread. - const std::string name = fmt::format("thread-{:08X}", entry_point); + const std::string name = fmt::format("{}-{:08X}", current_process->codeset->name, entry_point); CASCADE_RESULT(std::shared_ptr thread, kernel.CreateThread(name, entry_point, priority, arg, processor_id, stack_top, current_process)); diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 22789369b..7c491309d 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -455,9 +455,9 @@ std::shared_ptr SetupMainThread(KernelSystem& kernel, u32 entry_point, u } // Initialize new "main" thread - auto thread_res = - kernel.CreateThread("main", entry_point, priority, 0, owner_process->ideal_processor, - Memory::HEAP_VADDR_END, owner_process, sleep_time_ns == 0); + auto thread_res = kernel.CreateThread( + fmt::format("{}-main", owner_process->codeset->name), entry_point, priority, 0, + owner_process->ideal_processor, Memory::HEAP_VADDR_END, owner_process, sleep_time_ns == 0); std::shared_ptr thread = std::move(thread_res).Unwrap();