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

--- Comment #10 from Michał Górny <[email protected]> ---
Hmm, I should have mentioned that this affect LLDB right now.

The scenario where this happens is this:

1. Create breakpoint immediately after pthread_create().

2. When LLDB hits the breakpoint, create a watchpoint.

3. Resume.

The problem is that the new thread is already created at 2. but LLDB does not
know about it, so the watchpoint is created only on thread 1.

We can solve this on LLDB end in either of two ways:

a. Relist all threads (via PT_GETLWPLIST) on every stop.  In this case, LLDB at
point 2. would have the correct thread list even though the event is not yet
delivered.

b. Copy dbregs to new threads in LLDB when they are reported.  In this case,
the watchpoints are correctly propagated to new threads when LLDB becomes aware
of these threads.


Regardless of this, it would be nice if kernel had predictable behavior here,
i.e. reported the new thread before pthread_create() returned.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to