Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Nov 2020 12:47:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 250954] ptrace(): weird ordering between inheriting debug registers and reporting a new thread
Message-ID:  <bug-250954-227-iPJsUhAvBq@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-250954-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-250954-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250954

--- Comment #11 from Konstantin Belousov <kib@FreeBSD.org> ---
(In reply to Micha=C5=82 G=C3=B3rny from comment #10)
And again I do not understand what you are complaining about.

We stop target before new thread returns to userspace.  This is the moment
where
TDB_BORN or TBD_SCX are checked.  So if you are tracing either syscall exits
or forks you get stop with SIGTRAP and pl_flag PL_FLAG_BORN.  More, I belie=
ve
that pl_lwpid is set to the lwpid of the new thread.

At that stop, you can set whatever registers in the newborn thread.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250954-227-iPJsUhAvBq>