Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152993706
D37218.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
D37218.diff
View Options
diff --git a/sys/cddl/dev/fbt/x86/fbt_isa.c b/sys/cddl/dev/fbt/x86/fbt_isa.c
--- a/sys/cddl/dev/fbt/x86/fbt_isa.c
+++ b/sys/cddl/dev/fbt/x86/fbt_isa.c
@@ -84,6 +84,12 @@
if ((uintptr_t)fbt->fbtp_patchpoint != addr)
continue;
fbtrval = fbt->fbtp_rval;
+
+ /*
+ * Report the address of the breakpoint for the benefit
+ * of consumers fetching register values with regs[].
+ */
+ frame->tf_rip--;
for (; fbt != NULL; fbt = fbt->fbtp_tracenext) {
ASSERT(fbt->fbtp_rval == fbtrval);
if (fbt->fbtp_roffset == 0) {
@@ -143,6 +149,8 @@
cpu->cpu_dtrace_caller = 0;
}
}
+ /* Advance to the instruction following the breakpoint. */
+ frame->tf_rip++;
return (fbtrval);
}
diff --git a/sys/cddl/dev/kinst/amd64/kinst_isa.c b/sys/cddl/dev/kinst/amd64/kinst_isa.c
--- a/sys/cddl/dev/kinst/amd64/kinst_isa.c
+++ b/sys/cddl/dev/kinst/amd64/kinst_isa.c
@@ -139,6 +139,12 @@
if (kp == NULL)
return (0);
+ /*
+ * Report the address of the breakpoint for the benefit of consumers
+ * fetching register values with regs[].
+ */
+ frame->tf_rip--;
+
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
cpu->cpu_dtrace_caller = stack[0];
DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR);
@@ -162,7 +168,7 @@
if (kpmd->reg1 == -1 && kpmd->reg2 == -1) {
/* rip-relative */
- rval = frame->tf_rip - 1 + kpmd->instlen;
+ rval = frame->tf_rip + kpmd->instlen;
} else {
/* indirect */
rval = kinst_regval(frame, kpmd->reg1) +
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 19, 12:49 PM (3 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31771035
Default Alt Text
D37218.diff (1 KB)
Attached To
Mode
D37218: dtrace: Fix up %rip for invop probes on x86
Attached
Detach File
Event Timeline
Log In to Comment