Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177296444
D61139.1794105933.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
708 B
Referenced Files
None
Subscribers
None
D61139.1794105933.diff
View Options
diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c
--- a/sys/kern/subr_syscall.c
+++ b/sys/kern/subr_syscall.c
@@ -203,7 +203,13 @@
(uintptr_t)td, "pid:%d", td->td_proc->p_pid, "error:%d", error,
"retval0:%#lx", td->td_retval[0], "retval1:%#lx",
td->td_retval[1]);
- if (__predict_false(traced)) {
+ /*
+ * Refresh tracing state after syscall execution, but still clear flags
+ * left behind if the debugger detached.
+ */
+ traced = (p->p_flag & P_TRACED) != 0;
+ if (__predict_false(traced || (td->td_dbgflags & (TDB_SCE |
+ TDB_BOUNDARY | TDB_SET_SC_RET)) != 0)) {
PROC_LOCK(p);
td->td_dbgflags &= ~(TDB_SCE | TDB_BOUNDARY | TDB_SET_SC_RET);
PROC_UNLOCK(p);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 8, 2:45 AM (12 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41379518
Default Alt Text
D61139.1794105933.diff (708 B)
Attached To
Mode
D61139: ptrace: Refresh tracing state after syscall execution
Attached
Detach File
Event Timeline