Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153721919
D23507.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
689 B
Referenced Files
None
Subscribers
None
D23507.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 24, 5:27 AM (32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32027466
Default Alt Text
D23507.diff (689 B)
Attached To
Mode
D23507: Read the breakpoint instruction to determine its length in BKPT_SKIP.
Attached
Detach File
Event Timeline
Log In to Comment