From 3f3637332e9ff8892f588f7a996d4d0a6a5e205b Mon Sep 17 00:00:00 2001 From: Yifan Lu Date: Thu, 24 Mar 2016 20:49:24 -0500 Subject: [PATCH] Added svcBreak logging Added log entry for session connection --- source/kernel/Swi.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/kernel/Swi.cpp b/source/kernel/Swi.cpp index 096bc21..4ad2c0c 100644 --- a/source/kernel/Swi.cpp +++ b/source/kernel/Swi.cpp @@ -834,6 +834,7 @@ void ProcessSwi(u8 swi, u32 Reg[15], KThread * currentThread) u32 hand; if (temp->data->m_Client->connect(ses) == Success) { + LOG("Process %s thread %u connected to %s", currentThread->m_owner->GetName(), currentThread->m_thread_id, temp->data->m_Name); s32 ret = currentThread->m_owner->GetHandleTable()->CreateHandle(hand, ses); if (ret != Success) { @@ -1149,6 +1150,17 @@ void ProcessSwi(u8 swi, u32 Reg[15], KThread * currentThread) LOG("Process %s thread %u GetResourceLimitCurrentValues (%08x %08x %08x %08x | %08x)", currentThread->m_owner->GetName(), currentThread->m_thread_id, values_ptr, handleResourceLimit, names_ptr, nameCount, Reg[0]); #endif return; + } + case 0x3C: + { + XDSERROR("Breakpoint called from %08x, R0: %08x", Reg[14], Reg[0]); + Reg[0] = 0xF8C007F4;//TODO the 3DS would terminate the Process if it is realy unknown but some are just stubs + if (swi == 0x3C) + { + fflush(stdout); + while (1); + } + break; } case 0x3D: { -- 2.39.5