<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi Greg, </div><div><br></div><div>Thanks for your feedback.</div><div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">So I would suggest not using "ci.HandleCommand()" if you can. There are better API calls for this that will return your the objects that you need.<br></div></blockquote><div><br></div>I realise this, but the only reason I’m writing code that instantiates the debugger and controls this itself is because I cannot get the callbacks I need from the regular LLDB CLI driver (previous discussion here: <a href="http://lists.cs.uiuc.edu/pipermail/lldb-dev/2013-October/002554.html">http://lists.cs.uiuc.edu/pipermail/lldb-dev/2013-October/002554.html</a>)</div><div><br></div><div>I would *really* rather not have to reimplement the entire CLI myself, I just want some additional callbacks on top of LLDB’s CLI - which is why I’m using SBCommandInterpreter in the contrived example.<br><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Why is it blocking? You should look at a sample or interrupt with a debugger and see why.<br></div></blockquote><div><br></div>OK I will look.</div><div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">You should probably let the debugger handle everything including the command interpreter. Just call:<br><br>auto_handle_events = True<br>spawn_thread = False<br><br>debugger.RunCommandInterpreter (auto_handle_events, spawn_thread)<br><br>This will run everything for you just like the command line LLDB. If spawn_thread is false, then it will block until the command interpreter is exited, else if spawn_thread is true, the command interpreter will be run on another thread and it will return allowing you to do other things.<br><br>There currently isn't an option to just say "handle the events for me". The built in one exposed in SBDebugger::RunCommandInterpreter(...) will always print messages out to the stdout/stderr that you gave to the debugger:<br><br>   void<br>   SBDebugger::SetInputFileHandle (FILE *f, bool transfer_ownership);<br><br>   void<br>   SBDebugger::SetOutputFileHandle (FILE *f, bool transfer_ownership);<br><br>   void<br>   SBDebugger::SetErrorFileHandle (FILE *f, bool transfer_ownership);</div></blockquote><div><br></div><div>RunCommandInterpreter() sounds like it may do what I want it to do, I will give it a try.</div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">So if you don't want it to do that and provide the feedback just like the command line tool, then you should be running your own event loop.</div></blockquote><br></div><div>Yeah this is what I’m trying to avoid, as above.</div><div><br></div><div>Thanks,</div><div>Loukas</div><br></body></html>