[Lldb-commits] [PATCH] D62887: Update the thread list before setting stop reasons with an OS plugin

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 4 18:54:02 PDT 2019

jingham created this revision.
jingham added a reviewer: clayborg.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

When talking to a gdb-remote server that didn't support the newer thread info packets, we noticed that lldb would hit a breakpoint in target, but then continue on without stopping.  This was because the only indication of why you stopped in this scenario was the initial "T05thread:01;" packet.  Unfortunately, lldb read the stop reasons from the stop packet and created the new thread & set its stop reason BEFORE calling UpdateThreadListIfNeeded.  So when you finally got around to calling UpdateThreadListIfNeeded, we would notice that the ThreadList StopID was out of date, wipe the stop reasons, and then update.  Normally some other thread info packet would tell us the stop reason again, and we we'd get back on track.  But if they weren't supported, we'd be left thinking that the process had stopped for no reason, and auto-continue it.

The main part of the patch just adjusts the call to UpdateThreadListIfNeeded so it happens before we try to set StopInfo's.

I also added a test that captures this failure.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62887.203053.patch
Type: text/x-patch
Size: 11139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190605/54f055e8/attachment-0001.bin>

More information about the lldb-commits mailing list