diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2023-01-16 05:32:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2023-01-16 05:32:06 +0000 |
commit | 9d064db0a2a6e9cebcb374ca76fb50f4c069a39b (patch) | |
tree | 9d84891dd44eec95d345453bdae1169e120fe866 /sys/arch/powerpc | |
parent | ff34d857fd6e85016c617d586e47c6d77f44d0b5 (diff) |
we spent far too long debugging a weird go library problem (incorrect
arguments to mmap) because it was using syscall(2) and that callpath
is invisible in ktrace. make it visible, it will now show "(via syscall)"
and such.
ok guenther
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/powerpc/trap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index f22dad433aa..f79a2c03be5 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.128 2023/01/04 22:13:43 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.129 2023/01/16 05:32:05 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -243,7 +243,7 @@ trap(struct trapframe *frame) size_t argsize; register_t code, error; register_t *params, rval[2], args[10]; - int n; + int n, indirect = -1; if (frame->srr1 & PSL_PR) { type |= EXC_USER; @@ -369,6 +369,7 @@ trap(struct trapframe *frame) * code is first argument, * followed by actual args. */ + indirect = code; code = *params++; break; case SYS___syscall: @@ -378,6 +379,7 @@ trap(struct trapframe *frame) * for the rest of the args. */ params++; + indirect = code; code = *params++; break; default: @@ -403,7 +405,7 @@ trap(struct trapframe *frame) rval[0] = 0; rval[1] = frame->fixreg[FIRSTARG + 1]; - error = mi_syscall(p, code, callp, params, rval); + error = mi_syscall(p, code, indirect, callp, params, rval); switch (error) { case 0: |