예제 #1
0
 public static void GetSyscallParameters(ExceptionRegisters regs, out int scno, out int arg0, out int arg1, out int arg2, out int arg3, out int arg4, out int arg5)
 {
     scno = regs.eax;
     arg0 = regs.ebx;
     arg1 = regs.ecx;
     arg2 = regs.edx;
     arg3 = regs.esi;
     arg4 = regs.edi;
     arg5 = regs.ebp;
 }
예제 #2
0
 public static void GetSyscallParameters(ExceptionRegisters regs, out int scno, out int arg0, out int arg1, out int arg2, out int arg3, out int arg4, out int arg5)
 {
     scno = regs.eax;
     arg0 = regs.ebx;
     arg1 = regs.ecx;
     arg2 = regs.edx;
     arg3 = regs.esi;
     arg4 = regs.edi;
     arg5 = regs.ebp;
 }
예제 #3
0
        public static unsafe void ReturnFromSyscall(L4Handle target, ref ExceptionRegisters regs, int retval)
        {
            var p_exc = NativeMethods.l4api_utcb_exc();
            *p_exc = regs;

            // Skip the int $0x80 instruction
            p_exc->ip += 2;
            p_exc->eax = retval;

            var tag = new Msgtag(0, ExceptionRegisters.L4_UTCB_EXCEPTION_REGS_SIZE, 0, 0);
            NativeMethods.l4api_ipc_send(target, NativeMethods.l4api_utcb(), tag, Timeout.Never);
        }
예제 #4
0
        public static unsafe void ReturnFromSyscall(L4Handle target, ref ExceptionRegisters regs, int retval)
        {
            var p_exc = NativeMethods.l4api_utcb_exc();

            *p_exc = regs;

            // Skip the int $0x80 instruction
            p_exc->ip += 2;
            p_exc->eax = retval;

            var tag = new Msgtag(0, ExceptionRegisters.L4_UTCB_EXCEPTION_REGS_SIZE, 0, 0);

            NativeMethods.l4api_ipc_send(target, NativeMethods.l4api_utcb(), tag, Timeout.Never);
        }