Date: Mon, 09 Nov 2020 11:49:19 +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-8NyHFXYydp@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 #8 from Konstantin Belousov <kib@FreeBSD.org> --- (In reply to Micha=C5=82 G=C3=B3rny from comment #7) Actually not. Or rather, I updated your second example some more to query the list of threads on each stop, and for me it behaves exactly as I would expect it to behave: wait: pid=3D38618, waited=3D38618, ret=3D117f threads: 100447 tid =3D 100447, SIGSTOP set DR0=3D0x601878 (&g_val) on tid=3D100447 wait: pid=3D38618, waited=3D38618, ret=3D117f threads: 100447 100820 tid =3D 100447, SIGSTOP set DR0=3D0x601874 (&g_val2) on tid=3D100447 wait: pid=3D38618, waited=3D38618, ret=3D57f threads: 100447 100820 tid =3D 100820, SIGTRAP w/ PL_FLAG_BORN dr0=3D0x601878, g_val=3D0x601878, g_val2=3D0x601874 wait: pid=3D38618, waited=3D38618, ret=3D57f threads: 100447 100820 tid =3D 100820, SIGTRAP w/ PL_FLAG_EXITED thread started thread joined wait: pid=3D38618, waited=3D38618, ret=3D0 Now you set DR0 using explicit tid, and second PT_SETDBREGS only affects the main thread, while new thread 100820 inherits initial DR0. --=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-8NyHFXYydp>