Page MenuHomeFreeBSD

D23507.diff
No OneTemporary

D23507.diff

Index: head/sys/riscv/include/db_machdep.h
===================================================================
--- head/sys/riscv/include/db_machdep.h
+++ head/sys/riscv/include/db_machdep.h
@@ -53,8 +53,14 @@
#define BKPT_SIZE (INSN_SIZE)
#define BKPT_SET(inst) (BKPT_INST)
-#define BKPT_SKIP do { \
- kdb_frame->tf_sepc += BKPT_SIZE; \
+#define BKPT_SKIP do { \
+ uint32_t _instr; \
+ \
+ _instr = db_get_value(PC_REGS(), sizeof(uint32_t), FALSE); \
+ if ((_instr & 0x3) == 0x3) \
+ kdb_frame->tf_sepc += 4; /* ebreak */ \
+ else \
+ kdb_frame->tf_sepc += 2; /* c.ebreak */ \
} while (0)
#define db_clear_single_step kdb_cpu_clear_singlestep

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 5, 5:40 PM (15 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24855252
Default Alt Text
D23507.diff (689 B)

Event Timeline