[Lldb-commits] [lldb] r186033 - Add support for listing inferior thread names on Linux.
emaste at freebsd.org
Mon Jul 15 16:41:43 PDT 2013
On 15 July 2013 17:07, Kopec, Matt <matt.kopec at intel.com> wrote:
> Linux does something similar as in your example. I wasn't aware that you don't receive new thread notifications. That's really unfortunate.
I can add such a notification to FreeBSD relatively easily, but it
won't help with debugging on any existing releases, so we're still
stuck with a backwards-compatible method for some time.
> So in your case, do you generate the new thread or exit thread messages in ProcessMonitor and send them? Or do you just update the thread list in the monitor?
Right now, neither, so my thread list just stays as it was at attach
time. My current plan is to just compare (in RefreshStateAfterStop)
lldb's thread list with the one obtained from PT_GETLWPLIST, and
add/remove as necessary.
> For the renamed case I think we can make it a little smarter. We can put a hidden breakpoint on pthread_setname_np and/or prctl (haven't confirmed this but pthread_setname_np probably uses prctl to change the thread name). So when this gets hit we will know the inferior thread name will be changed.
Can you break on a specific syscall on Linux? On FreeBSD we're not
going to want to trap every syscall looking for thr_set_name, so I
think we'll have to do the compare-after stop.
More information about the lldb-commits