diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-06-04 22:56:14 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-06-04 22:56:14 +0000 |
commit | 0c83b78bc6cf8f812dd72d9470bd65157880a96a (patch) | |
tree | 0cdf22b6a08b7fab0d76712a5f1a0923e18ec387 /sys/arch | |
parent | 28fe999af9cbbe9254cfd5f3e95b68818ac74d41 (diff) |
Make backtraces through interrupts work.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/db_trace.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/db_trace.c b/sys/arch/amd64/amd64/db_trace.c index c41b9a79142..a790cf9a110 100644 --- a/sys/arch/amd64/amd64/db_trace.c +++ b/sys/arch/amd64/amd64/db_trace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_trace.c,v 1.5 2009/06/04 19:42:22 kettenis Exp $ */ +/* $OpenBSD: db_trace.c,v 1.6 2009/06/04 22:56:13 kettenis Exp $ */ /* $NetBSD: db_trace.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */ /* @@ -110,6 +110,7 @@ struct x86_64_frame { struct x86_64_frame *f_frame; long f_retaddr; long f_arg0; + long f_arg1; }; #define NONE 0 @@ -344,8 +345,12 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count, continue; } + if (is_trap == INTERRUPT) + argp = &lastframe->f_arg1; + else + argp = &frame->f_arg0; lastframe = frame; - db_nextframe(&frame, &callpc, &frame->f_arg0, is_trap, pr); + db_nextframe(&frame, &callpc, argp, is_trap, pr); if (frame == 0) { /* end of chain */ |