Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Aug 2015 16:49:11 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287134 - head/sys/arm64/arm64
Message-ID:  <201508251649.t7PGnBhR033945@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Tue Aug 25 16:49:10 2015
New Revision: 287134
URL: https://svnweb.freebsd.org/changeset/base/287134

Log:
  Call into kdb on a data abort when it's enabled. This is needed to
  correctly handle trying to access an invalid address in the debugger.
  
  While here document that the breakpoint handler is supposed to fall
  through to the following case.
  
  Sponsored by:	ABT Systems Ltd

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

Modified: head/sys/arm64/arm64/trap.c
==============================================================================
--- head/sys/arm64/arm64/trap.c	Tue Aug 25 16:43:32 2015	(r287133)
+++ head/sys/arm64/arm64/trap.c	Tue Aug 25 16:49:10 2015	(r287134)
@@ -155,6 +155,13 @@ data_abort(struct trapframe *frame, uint
 	uint64_t far;
 	int error, sig, ucode;
 
+#ifdef KDB
+	if (kdb_active) {
+		kdb_reenter();
+		return;
+	}
+#endif
+
 	td = curthread;
 	pcb = td->td_pcb;
 
@@ -221,6 +228,11 @@ data_abort(struct trapframe *frame, uint
 				frame->tf_elr = pcb->pcb_onfault;
 				return;
 			}
+#ifdef KDB
+			if (debugger_on_panic || kdb_active)
+				if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame))
+					return;
+#endif
 			panic("vm_fault failed: %lx", frame->tf_elr);
 		}
 	}
@@ -293,6 +305,7 @@ do_el1h_sync(struct trapframe *frame)
 			break;
 		}
 #endif
+		/* FALLTHROUGH */
 	case EXCP_WATCHPT_EL1:
 	case EXCP_SOFTSTP_EL1:
 #ifdef KDB



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508251649.t7PGnBhR033945>