Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hppa/hppa Pass the trap address in ksi_addr without...



details:   https://anonhg.NetBSD.org/src/rev/d803c9ecb3ee
branches:  trunk
changeset: 778973:d803c9ecb3ee
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Apr 23 11:25:03 2012 +0000

description:
Pass the trap address in ksi_addr without privilege bits.

Previously GDB would get confused by the trap address given when hitting
the _rtld_debug_state breakpoint.

diffstat:

 sys/arch/hppa/hppa/trap.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 1a56d14ff01d -r d803c9ecb3ee sys/arch/hppa/hppa/trap.c
--- a/sys/arch/hppa/hppa/trap.c Mon Apr 23 09:27:36 2012 +0000
+++ b/sys/arch/hppa/hppa/trap.c Mon Apr 23 11:25:03 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.100 2012/04/06 12:21:59 skrll Exp $ */
+/*     $NetBSD: trap.c,v 1.101 2012/04/23 11:25:03 skrll Exp $ */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.100 2012/04/06 12:21:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.101 2012/04/23 11:25:03 skrll Exp $");
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -685,7 +685,7 @@
                ksi.ksi_signo = SIGTRAP;
                ksi.ksi_code = TRAP_TRACE;
                ksi.ksi_trap = trapnum;
-               ksi.ksi_addr = (void *)frame->tf_iioq_head;
+               ksi.ksi_addr = (void *)(frame->tf_iioq_head & ~HPPA_PC_PRIV_MASK);
 #ifdef PTRACE
                ss_clear_breakpoints(l);
                if (opcode == SSBREAKPOINT)
@@ -693,7 +693,6 @@
 #endif
                /* pass to user debugger */
                trapsignal(l, &ksi);
- 
                break;
 
 #ifdef PTRACE
@@ -704,7 +703,7 @@
                ksi.ksi_signo = SIGTRAP;
                ksi.ksi_code = TRAP_TRACE;
                ksi.ksi_trap = trapnum;
-               ksi.ksi_addr = (void *)frame->tf_iioq_head;
+               ksi.ksi_addr = (void *)(frame->tf_iioq_head & ~HPPA_PC_PRIV_MASK);
 
                 /* pass to user debugger */
                trapsignal(l, &ksi);



Home | Main Index | Thread Index | Old Index