Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/amd64 fix stack backtraces through traps.



details:   https://anonhg.NetBSD.org/src/rev/48d14bd769f3
branches:  trunk
changeset: 777536:48d14bd769f3
user:      chs <chs%NetBSD.org@localhost>
date:      Wed Feb 22 14:12:04 2012 +0000

description:
fix stack backtraces through traps.

diffstat:

 sys/arch/amd64/amd64/db_machdep.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 3975831f41d9 -r 48d14bd769f3 sys/arch/amd64/amd64/db_machdep.c
--- a/sys/arch/amd64/amd64/db_machdep.c Wed Feb 22 12:36:14 2012 +0000
+++ b/sys/arch/amd64/amd64/db_machdep.c Wed Feb 22 14:12:04 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_machdep.c,v 1.1 2011/04/10 20:36:49 christos Exp $  */
+/*     $NetBSD: db_machdep.c,v 1.2 2012/02/22 14:12:04 chs Exp $       */
 
 /* 
  * Mach Operating System
@@ -26,7 +26,7 @@
  * rights to redistribute these changes.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.1 2011/04/10 20:36:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.2 2012/02/22 14:12:04 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -131,7 +131,7 @@
            default:
 
                /* The only argument to trap() or syscall() is the trapframe. */
-               tf = *(struct trapframe **)argp;
+               tf = (struct trapframe *)argp;
                switch (is_trap) {
                case TRAP:
                        (*pr)("--- trap (number %d) ---\n", tf->tf_trapno);
@@ -141,7 +141,6 @@
                        break;
                case INTERRUPT:
                        (*pr)("--- interrupt ---\n");
-                       tf = (struct trapframe *)argp;
                        break;
                }
                *ip = (db_addr_t)tf->tf_rip;



Home | Main Index | Thread Index | Old Index