Skip to content

Commit

Permalink
Print syscall name on syscall exit (when using SYSCALL_DEBUG).
Browse files Browse the repository at this point in the history
XXX this should use kernhist.
  • Loading branch information
matt committed Sep 1, 2011
1 parent d9df230 commit f81994e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sys/kern/kern_xxx.c
@@ -1,4 +1,4 @@
/* $NetBSD: kern_xxx.c,v 1.71 2010/11/21 17:57:24 pooka Exp $ */
/* $NetBSD: kern_xxx.c,v 1.72 2011/09/01 18:25:44 matt Exp $ */

/*
* Copyright (c) 1982, 1986, 1989, 1993
Expand Down Expand Up @@ -32,7 +32,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_xxx.c,v 1.71 2010/11/21 17:57:24 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_xxx.c,v 1.72 2011/09/01 18:25:44 matt Exp $");

#ifdef _KERNEL_OPT
#include "opt_syscall_debug.h"
Expand Down Expand Up @@ -180,8 +180,9 @@ scdebug_ret(register_t code, int error, const register_t retval[])
)
printf("OUT OF RANGE (%ld)", (long)code);
else
printf("%ld ret: err = %d, rv = 0x%lx,0x%lx", (long)code,
error, (long)retval[0], (long)retval[1]);
printf("%ld ret %s: err = %d, rv = 0x%lx,0x%lx", (long)code,
em->e_syscallnames[code], error,
(long)retval[0], (long)retval[1]);
printf("\n");
}
#endif /* SYSCALL_DEBUG */

0 comments on commit f81994e

Please sign in to comment.