git: 090db1352edb - stable/13 - arm64: add definition for IS_SSTEP_TRAP()
Mitchell Horne
mhorne at FreeBSD.org
Mon Mar 8 14:03:52 UTC 2021
The branch stable/13 has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=090db1352edbb62cfe4b5e936ee7664756f1580a
commit 090db1352edbb62cfe4b5e936ee7664756f1580a
Author: Mitchell Horne <mhorne at FreeBSD.org>
AuthorDate: 2021-03-01 14:01:25 +0000
Commit: Mitchell Horne <mhorne at FreeBSD.org>
CommitDate: 2021-03-08 14:02:42 +0000
arm64: add definition for IS_SSTEP_TRAP()
arm64 has a distinct exception code for single-step, so we can use this
to detect when an unexpected SS trap is encountered, or when an expected
one is not. See db_stop_at_pc().
Reviewed by: markj, jhb
Sponsored by: The FreeBSD Foundation
(cherry picked from commit e152c882738ffe26a2f52e420e2a92c014943207)
---
sys/arm64/include/db_machdep.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/arm64/include/db_machdep.h b/sys/arm64/include/db_machdep.h
index 61b58415e41c..105e8e507ce3 100644
--- a/sys/arm64/include/db_machdep.h
+++ b/sys/arm64/include/db_machdep.h
@@ -38,6 +38,7 @@
#include <machine/trap.h>
#define T_BREAKPOINT (EXCP_BRK)
+#define T_SINGLESTEP (EXCP_SOFTSTP_EL1)
#define T_WATCHPOINT (EXCP_WATCHPT_EL1)
typedef vm_offset_t db_addr_t;
@@ -58,6 +59,7 @@ typedef long db_expr_t;
#define db_set_single_step kdb_cpu_set_singlestep
#define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT)
+#define IS_SSTEP_TRAP(type, code) (type == T_SINGLESTEP)
#define IS_WATCHPOINT_TRAP(type, code) (type == T_WATCHPOINT)
#define inst_trap_return(ins) (0)
More information about the dev-commits-src-all
mailing list