aboutsummaryrefslogtreecommitdiff
path: root/target/riscv/debug.h
diff options
context:
space:
mode:
authorFrank Chang <frank.chang@sifive.com>2022-09-09 21:42:13 +0800
committerAlistair Francis <alistair.francis@wdc.com>2022-09-27 11:23:57 +1000
commitd1c111411e6240c01ee3d54801a7e3eeb6acc3b1 (patch)
treecbc7287ee92b688d6398ad313fbd78eb686094ae /target/riscv/debug.h
parent31b9798d824512b7daf868cc8581f9a97a9d13a8 (diff)
downloadqemu-d1c111411e6240c01ee3d54801a7e3eeb6acc3b1.zip
qemu-d1c111411e6240c01ee3d54801a7e3eeb6acc3b1.tar.gz
qemu-d1c111411e6240c01ee3d54801a7e3eeb6acc3b1.tar.bz2
target/riscv: debug: Create common trigger actions function
Trigger actions are shared among all triggers. Extract to a common function. Signed-off-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> [bmeng: handle the DBG_ACTION_NONE case] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Message-Id: <20220909134215.1843865-7-bmeng.cn@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/debug.h')
-rw-r--r--target/riscv/debug.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/riscv/debug.h b/target/riscv/debug.h
index 9f69c64..0e4859c 100644
--- a/target/riscv/debug.h
+++ b/target/riscv/debug.h
@@ -44,6 +44,19 @@ typedef enum {
TRIGGER_TYPE_NUM
} trigger_type_t;
+/* actions */
+typedef enum {
+ DBG_ACTION_NONE = -1, /* sentinel value */
+ DBG_ACTION_BP = 0,
+ DBG_ACTION_DBG_MODE,
+ DBG_ACTION_TRACE0,
+ DBG_ACTION_TRACE1,
+ DBG_ACTION_TRACE2,
+ DBG_ACTION_TRACE3,
+ DBG_ACTION_EXT_DBG0 = 8,
+ DBG_ACTION_EXT_DBG1
+} trigger_action_t;
+
/* tdata1 field masks */
#define RV32_TYPE(t) ((uint32_t)(t) << 28)