diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-04-26 16:54:00 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-04-26 16:54:00 +0000 |
commit | 3a00d80cee0c92bf93d2d78be81e9f71fec40923 (patch) | |
tree | cb0f060c091cf6f130f4b1815efbefca32752562 /sys/arch/powerpc | |
parent | 268ec2e09f2c2324f9f3b77ea277b6a9285a6aa9 (diff) |
Implement dt(4) utrace support on amd64 and i386.
This adds stacktrace_save_utrace() to extract and save the userland stack
which is stubbed out on most archs. alpha and riscv64 do not even implement
dt(4) and stacktrace_save_at() so the stubs are excluded there.
Additionally add a new ioctl DTIOCGETAUXBASE which allows btrace to
fetch the AUX_BASE vallue from the AUX vector of a process.
OK mpi@ (some time ago) discussed with kettenis@
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/ddb/db_trace.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/powerpc/ddb/db_trace.c b/sys/arch/powerpc/ddb/db_trace.c index e9351e93f6c..46cba9b61e4 100644 --- a/sys/arch/powerpc/ddb/db_trace.c +++ b/sys/arch/powerpc/ddb/db_trace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_trace.c,v 1.19 2022/02/07 22:28:15 gkoehler Exp $ */ +/* $OpenBSD: db_trace.c,v 1.20 2023/04/26 16:53:59 claudio Exp $ */ /* $NetBSD: db_trace.c,v 1.15 1996/02/22 23:23:41 gwr Exp $ */ /* @@ -268,3 +268,9 @@ stacktrace_save_at(struct stacktrace *st, unsigned int skip) break; } } + +void +stacktrace_save_utrace(struct stacktrace *st) +{ + st->st_count = 0; +} |