[lldb-dev] debugserver inferior launch, stopped, $qC and $? thread not matching

Todd Fiala todd.fiala at gmail.com
Mon May 5 22:45:48 PDT 2014

Hi Greg,

I'm about to add a protocol-level test for llgs and debugserver that
verifies that a launched inferior process's initial reported thread (i.e.
response to $qC) is the same thread that reports when asking for stop state
($?), or at least that the thread-id is present in the threads listed when
QListThreadsInStopReply is available.  What I'm finding on debugserver on
MacOSX is that right after the successful launch with $A, the $qC query
responds with a $QC{thread-id}.  The very next $?, though, without any
intervening resume operation, lists the threads but doesn't contain the
{thread-id} from the $QC.

Here's a real transcript (with non-interesting bits removed).  It's from a
debugserver started with no inferior, then attached to by lldb, then
launching the first inferior process.

<lldb.driver.main-thread> <  27> send packet: $QListThreadsInStopReply#21
<lldb.driver.main-thread> <   6> read packet: $OK#00
<lldb.driver.main-thread> <  13> send packet: $qHostInfo#9b
<lldb.driver.main-thread> < 122> read packet:
<lldb.driver.main-thread> <  66> send packet:
<lldb.driver.main-thread> <   6> read packet: $OK#00
<lldb.driver.main-thread> <  18> send packet: $qLaunchSuccess#a5
<lldb.driver.main-thread> <   6> read packet: $OK#00
<lldb.driver.main-thread> <   6> send packet: $qC#b4
<lldb.driver.main-thread> <   9> *read packet: $QC980#00*   <<< Doesn't
this say the app is launched, stopped, and thread-id 980 is selected?
<lldb.driver.main-thread> <   5> send packet: $?#3f
<lldb.driver.main-thread> < 503> read packet: $T11*thread:63f5*;qaddr:a0;

The $? response seems to say it only has one thread, 63f5.  I would expect
at least the 980 thread-id reported in the initial qC packet to exist

What am I missing?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140505/d14d0ef3/attachment.html>

More information about the lldb-dev mailing list