Author: jhb
Date: Mon Jul 27 16:32:21 2020
New Revision: 363617
URL: https://svnweb.freebsd.org/changeset/base/363617

Log:
  Fix si_addr value for breakpoints in a delay slot.
  
  Reviewed by:  kib
  Obtained from:        CheriBSD
  Sponsored by: DARPA
  Differential Revision:        https://reviews.freebsd.org/D25773

Modified:
  head/sys/mips/mips/trap.c

Modified: head/sys/mips/mips/trap.c
==============================================================================
--- head/sys/mips/mips/trap.c   Mon Jul 27 16:31:21 2020        (r363616)
+++ head/sys/mips/mips/trap.c   Mon Jul 27 16:32:21 2020        (r363617)
@@ -824,12 +824,12 @@ dofault:
 
                        i = SIGTRAP;
                        ucode = TRAP_BRKPT;
-                       addr = trapframe->pc;
 
                        /* compute address of break instruction */
                        va = trapframe->pc;
                        if (DELAYBRANCH(trapframe->cause))
                                va += sizeof(int);
+                       addr = va;
 
                        if (td->td_md.md_ss_addr != va)
                                break;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to