Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139394482
D24018.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D24018.diff
View Options
Index: head/sys/cddl/dev/dtrace/riscv/dtrace_subr.c
===================================================================
--- head/sys/cddl/dev/dtrace/riscv/dtrace_subr.c
+++ head/sys/cddl/dev/dtrace/riscv/dtrace_subr.c
@@ -255,6 +255,8 @@
int invop;
invop = dtrace_invop(frame->tf_sepc, frame, frame->tf_sepc);
+ if (invop == 0)
+ return (-1);
if (match_opcode(invop, (MATCH_SD | RS2_RA | RS1_SP),
(MASK_SD | RS2_MASK | RS1_MASK))) {
@@ -291,6 +293,10 @@
frame->tf_sepc = frame->tf_ra;
return (0);
}
+
+#ifdef INVARIANTS
+ panic("Instruction %x doesn't match any opcode.", invop);
+#endif
return (-1);
}
Index: head/sys/riscv/riscv/trap.c
===================================================================
--- head/sys/riscv/riscv/trap.c
+++ head/sys/riscv/riscv/trap.c
@@ -274,10 +274,9 @@
break;
case EXCP_BREAKPOINT:
#ifdef KDTRACE_HOOKS
- if (dtrace_invop_jump_addr != 0) {
- dtrace_invop_jump_addr(frame);
- break;
- }
+ if (dtrace_invop_jump_addr != NULL &&
+ dtrace_invop_jump_addr(frame) == 0)
+ break;
#endif
#ifdef KDB
kdb_trap(exception, 0, frame);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 12, 3:39 PM (4 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26900871
Default Alt Text
D24018.diff (1 KB)
Attached To
Mode
D24018: fix debug.kdb.enter=1 with dtrace-enabled kernel
Attached
Detach File
Event Timeline
Log In to Comment