[Bug 250954] ptrace(): weird ordering between inheriting debug registers and reporting a new thread
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Nov 10 21:18:12 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250954
--- Comment #16 from Konstantin Belousov <kib at FreeBSD.org> ---
(In reply to Pavel Labath from comment #15)
Do you mean that events channel for Linux debugging facility is per-thread ?
In FreeBSD, ptrace(2)/waitpid(2) report all process events, with proper
qualification when it comes from specific thread. As result, we do not really
need pre-notification about new thread to be created. ptrace() produces a stop
in the context of new thread before it executes first userspace instruction,
informing debugger about lwpid and allowing it to make changes to the thread
state before it ever has chance to execute.
I suspect that the race that we discussed there either handled somewhat
different
in Linux, or exists in Linux as well. It is between the event from the context
of the new thread, and kernel taking snapshot of the state of the parent thread
to set child state.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list