<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<BR> <BR>I am running on Linux Ubuntu 14.04 with lldb-4.7 I built from sources about a month ago.<BR> <BR>My C++ debugger does pretty much the following:<BR><ol><li>Initializes LLDB, sets it to async mode</li><li>Gets listener from debugger, subscribes for process and target events </li><li>Sets a few breakpoints</li><li>Waits for event on the listener</li><li>If event is a process event </li><ul><li>If event type is eBroadcastBitSTDOUT or eBroadcastBitSTERR</li><ul><li>call SBDebugger::HandleProcessEvent() to get it printed</li></ul><li>else if process state is eStateStopped</li><ul><li>scan all the target threads and checks their stop reason, registers, etc.</li><li>call SBProcess::Continue()</li></ul></ul><li>Loop to 4</li></ol> <BR>Now, the program behavior varies - so it might be I am doing something wrong...<BR> <BR>One version of the program always gets stray stopped event in the very beginning after reporting several module loads. In this case it has only one thread yet and the thread stop reason is eStopReasonNone. when it happens, I have to skip calling SBProcess::Continue() - i.e. just ignore this event as if the target state was eStateRunning and reissue wait for event. This is a bit annoying but detection and workaround are simple.<BR> <BR>Another version of the program does not subscribe for target events. It often works smooth, but once in a while gets stray stopped event and the thread state is eStopReasonTrace. I should not call SBProcess::Continue() in this case too. Now the problem is that I do turn on tracing sometimes, and if it is genuine trace event I have to call continue.<BR> <BR>Any advice - how to investigate this problem - if it is my bug or something in LLDB?<BR> <BR>Thanks,<BR>Eugene<BR> </div></body>
</html>