Module Name:    src
Committed By:   skrll
Date:           Mon Apr 23 11:25:03 UTC 2012

Modified Files:
        src/sys/arch/hppa/hppa: trap.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/hppa/hppa/trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hppa/hppa/trap.c
diff -u src/sys/arch/hppa/hppa/trap.c:1.100 src/sys/arch/hppa/hppa/trap.c:1.101
--- src/sys/arch/hppa/hppa/trap.c:1.100	Fri Apr  6 12:21:59 2012
+++ src/sys/arch/hppa/hppa/trap.c	Mon Apr 23 11:25:03 2012
@@ -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 @@ do_onfault:
 		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 @@ do_onfault:
 #endif
 		/* pass to user debugger */
 		trapsignal(l, &ksi);
- 
 		break;
 
 #ifdef PTRACE
@@ -704,7 +703,7 @@ do_onfault:
 		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);

Reply via email to