private void Break(ulong reason) { KThread currentThread = _system.Scheduler.GetCurrentThread(); if ((reason & (1UL << 31)) == 0) { currentThread.PrintGuestStackTrace(); // As the process is exiting, this is probably caused by emulation termination. if (currentThread.Owner.State == ProcessState.Exiting) { return; } // TODO: Debug events. currentThread.Owner.TerminateCurrentProcess(); throw new GuestBrokeExecutionException(); } else { Logger.PrintInfo(LogClass.KernelSvc, "Debugger triggered."); currentThread.PrintGuestStackTrace(); } }
private void Break(ulong reason) { KThread currentThread = _system.Scheduler.GetCurrentThread(); if ((reason & (1UL << 31)) == 0) { currentThread.PrintGuestStackTrace(); throw new GuestBrokeExecutionException(); } else { Logger.PrintInfo(LogClass.KernelSvc, "Debugger triggered."); currentThread.PrintGuestStackTrace(); } }