From 338d9ca7981f25099d99d280b0dd3af590d65763 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Tue, 22 Jan 2013 22:32:14 +0100 Subject: Add the mach_print debugging system call The purpose of this system call is to help debugging in situations where it's desirable to bypass the mach_msg call entirely. * include/mach/syscall_sw.h (mach_print): Generate system call code. * kern/syscall_subr.c: Include . [MACH_KDB] (mach_print): New function. * kern/syscall_subr.h (mach_print): New prototype. * kern/syscall_sw.c [MACH_KDB] (mach_trap_table): Declare mach_print system call. --- kern/syscall_sw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'kern/syscall_sw.c') diff --git a/kern/syscall_sw.c b/kern/syscall_sw.c index b2e20e66..607d843e 100644 --- a/kern/syscall_sw.c +++ b/kern/syscall_sw.c @@ -122,8 +122,12 @@ mach_trap_t mach_trap_table[] = { MACH_TRAP(mach_thread_self, 0), /* 27 */ MACH_TRAP(mach_task_self, 0), /* 28 */ MACH_TRAP(mach_host_self, 0), /* 29 */ +#ifdef MACH_KDB + MACH_TRAP_STACK(mach_print, 1), /* 30 */ +#else /* MACH_KDB */ + MACH_TRAP_STACK(kern_invalid, 0), /* 30 */ +#endif /* MACH_KDB */ - MACH_TRAP(kern_invalid, 0), /* 30 */ MACH_TRAP(kern_invalid, 0), /* 31 */ MACH_TRAP(kern_invalid, 0), /* 32 */ MACH_TRAP(kern_invalid, 0), /* 33 emul: task_by_pid */ -- cgit v1.2.3