Example #1
0
        public void SvcCall(object sender, AInstExceptionEventArgs e)
        {
            AThreadState ThreadState = (AThreadState)sender;

            if (SvcFuncs.TryGetValue(e.Id, out SvcFunc Func))
            {
                Logging.Trace($"(Thread {ThreadState.ThreadId}) {Func.Method.Name} called.");

                Func(ThreadState);

                Logging.Trace($"(Thread {ThreadState.ThreadId}) {Func.Method.Name} ended.");
            }
            else
            {
                throw new NotImplementedException(e.Id.ToString("x4"));
            }
        }
Example #2
0
        public void SvcCall(object sender, AInstExceptionEventArgs e)
        {
            AThreadState ThreadState = (AThreadState)sender;

            Process.GetThread(ThreadState.Tpidr).LastPc = e.Position;

            if (SvcFuncs.TryGetValue(e.Id, out SvcFunc Func))
            {
                Device.Log.PrintDebug(LogClass.KernelSvc, $"{Func.Method.Name} called.");

                Func(ThreadState);

                Device.Log.PrintDebug(LogClass.KernelSvc, $"{Func.Method.Name} ended.");
            }
            else
            {
                Process.PrintStackTrace(ThreadState);

                throw new NotImplementedException($"0x{e.Id:x4}");
            }
        }
Example #3
0
        public void SvcCall(object sender, AInstExceptionEventArgs e)
        {
            AThreadState ThreadState = (AThreadState)sender;

            Process.GetThread(ThreadState.Tpidr).LastPc = e.Position;

            if (SvcFuncs.TryGetValue(e.Id, out SvcFunc Func))
            {
                Ns.Log.PrintDebug(LogClass.KernelSvc, $"{Func.Method.Name} called.");

                Func(ThreadState);

                Process.Scheduler.Reschedule(Process.GetThread(ThreadState.Tpidr));

                Ns.Log.PrintDebug(LogClass.KernelSvc, $"{Func.Method.Name} ended.");
            }
            else
            {
                Process.PrintStackTrace(ThreadState);

                throw new NotImplementedException(e.Id.ToString("x4"));
            }
        }
Example #4
0
 private void BreakHandler(object sender, AInstExceptionEventArgs e)
 {
     throw new GuestBrokeExecutionException();
 }
Example #5
0
        private void BreakHandler(object sender, AInstExceptionEventArgs e)
        {
            PrintStackTraceForCurrentThread();

            throw new GuestBrokeExecutionException();
        }