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/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250954 --- Comment #8 from Konstantin Belousov <kib@FreeBSD.org> --- (In reply to Michał Górny 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=38618, waited=38618, ret=117f threads: 100447 tid = 100447, SIGSTOP set DR0=0x601878 (&g_val) on tid=100447 wait: pid=38618, waited=38618, ret=117f threads: 100447 100820 tid = 100447, SIGSTOP set DR0=0x601874 (&g_val2) on tid=100447 wait: pid=38618, waited=38618, ret=57f threads: 100447 100820 tid = 100820, SIGTRAP w/ PL_FLAG_BORN dr0=0x601878, g_val=0x601878, g_val2=0x601874 wait: pid=38618, waited=38618, ret=57f threads: 100447 100820 tid = 100820, SIGTRAP w/ PL_FLAG_EXITED thread started thread joined wait: pid=38618, waited=38618, ret=0 Now you set DR0 using explicit tid, and second PT_SETDBREGS only affects the main thread, while new thread 100820 inherits initial DR0. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250954-227-8NyHFXYydp>
