Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/usermode Enhance printing of system callss
details: https://anonhg.NetBSD.org/src/rev/bc8d07cdd071
branches: trunk
changeset: 771936:bc8d07cdd071
user: reinoud <reinoud%NetBSD.org@localhost>
date: Fri Dec 09 17:20:21 2011 +0000
description:
Enhance printing of system callss
diffstat:
sys/arch/usermode/usermode/syscall.c | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diffs (60 lines):
diff -r 516004d56173 -r bc8d07cdd071 sys/arch/usermode/usermode/syscall.c
--- a/sys/arch/usermode/usermode/syscall.c Fri Dec 09 15:26:48 2011 +0000
+++ b/sys/arch/usermode/usermode/syscall.c Fri Dec 09 17:20:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.11 2011/11/27 21:38:17 reinoud Exp $ */
+/* $NetBSD: syscall.c,v 1.12 2011/12/09 17:20:21 reinoud Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.11 2011/11/27 21:38:17 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.12 2011/12/09 17:20:21 reinoud Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -106,10 +106,24 @@
if (code != 4) {
printf("code %3d, nargs %d, argsize %3d\t%s(",
code, nargs, argsize, syscallnames[code]);
- for (int i = 0; i < nargs; i++)
- printf("%"PRIx32", ", (uint) args[i]);
- if (nargs)
- printf("\b\b");
+ switch (code) {
+ case 5:
+ printf("\"%s\", %"PRIx32", %"PRIx32"", (char *) (args[0]), (uint) args[1], (uint) args[2]);
+ break;
+ case 33:
+ printf("\"%s\", %"PRIx32"", (char *) (args[0]), (uint) args[1]);
+ break;
+ case 50:
+ printf("\"%s\"", (char *) (args[0]));
+ break;
+ case 58:
+ printf("\"%s\", %"PRIx32", %"PRIx32"", (char *) (args[0]), (uint) (args[1]), (uint) args[2]);
+ default:
+ for (int i = 0; i < nargs; i++)
+ printf("%"PRIx32", ", (uint) args[i]);
+ if (nargs)
+ printf("\b\b");
+ }
printf(") ");
}
#if 0
@@ -118,10 +132,10 @@
dprintf_debug("syscall no. %d, ", code);
dprintf_debug("nargs %d, argsize %d => ", nargs, argsize);
#endif
-#if 0
+#if 1
if ((code == 4)) {
dprintf_debug("[us] %s", (char *) args[1]);
- printf("[us] %s", (char *) args[1]);
+// printf("[us] %s", (char *) args[1]);
}
#endif
if (code == 440)
Home |
Main Index |
Thread Index |
Old Index