Example #1
0
        private void SvcBreak(CpuThreadState threadState)
        {
            long reason  = (long)threadState.X0;
            long unknown = (long)threadState.X1;
            long info    = (long)threadState.X2;

            KThread currentThread = _system.Scheduler.GetCurrentThread();

            if ((reason & (1 << 31)) == 0)
            {
                currentThread.PrintGuestStackTrace();

                throw new GuestBrokeExecutionException();
            }
            else
            {
                Logger.PrintInfo(LogClass.KernelSvc, "Debugger triggered.");

                currentThread.PrintGuestStackTrace();
            }
        }