[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 12:56:54 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250954

Pavel Labath <p-freebsd at labath.sk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p-freebsd at labath.sk

--- Comment #15 from Pavel Labath <p-freebsd at labath.sk> ---
Hi all. I have a semi-random peanut gallery comment.

This talk of two events has reminded me of how thread creating works on linux.
There, the tracer indeed gets two events for thread creation, one on the
main(parent) thread, and one for the newly created child thread.

The parent event (PTRACE_EVENT_CLONE) comes with the pid of the new thread, and
it allows the tracer to wait for the creation event on the newly created
thread, if he chooses to do that. Lldb chooses to do that, as it makes it
easier to reason about the state of the process.

I am not very familiar with the ptrace model on freebsd (I understand there are
significant differences), but it sounds like something like that might be
useful here too...

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list