Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F134807586
D23507.id.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.id.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
Wed, Nov 5, 5:50 PM (15 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24855252
Default Alt Text
D23507.id.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