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 Only report the SSBREAKPOINT break instru...



details:   https://anonhg.NetBSD.org/src/rev/bc7833b98008
branches:  trunk
changeset: 366700:bc7833b98008
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Jun 09 16:45:38 2022 +0000

description:
Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT

This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and single-step breakpoints

diffstat:

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

diffs (34 lines):

diff -r 8ef0af73aa74 -r bc7833b98008 sys/arch/hppa/hppa/trap.c
--- a/sys/arch/hppa/hppa/trap.c Thu Jun 09 16:41:25 2022 +0000
+++ b/sys/arch/hppa/hppa/trap.c Thu Jun 09 16:45:38 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.119 2022/06/09 16:38:23 skrll Exp $ */
+/*     $NetBSD: trap.c,v 1.120 2022/06/09 16:45:38 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.119 2022/06/09 16:38:23 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.120 2022/06/09 16:45:38 skrll Exp $");
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -773,13 +773,13 @@
        case T_DBREAK | T_USER:
                KSI_INIT_TRAP(&ksi);
                ksi.ksi_signo = SIGTRAP;
-               ksi.ksi_code = TRAP_TRACE;
+               ksi.ksi_code = TRAP_BRKPT;
                ksi.ksi_trap = trapnum;
                ksi.ksi_addr = (void *)(frame->tf_iioq_head & ~HPPA_PC_PRIV_MASK);
 #ifdef PTRACE
                ss_clear_breakpoints(l);
                if (opcode == SSBREAKPOINT)
-                       ksi.ksi_code = TRAP_BRKPT;
+                       ksi.ksi_code = TRAP_TRACE;
 #endif
                /* pass to user debugger */
                trapsignal(l, &ksi);



Home | Main Index | Thread Index | Old Index