<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">It seems that the real problem is that sometimes lldb-mi can't launch a process:<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><div class="gmail_default">build/bin/lldb-mi --synchronous a.out < llvm/tools/lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test </div><div class="gmail_default">(gdb)</div><div class="gmail_default">-file-exec-and-symbols "a.out"</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="/home/alexander/workspace/gsoc/a.out",target-name="/home/alexander/workspace/gsoc/a.out",host-name="/home/alexander/workspace/gsoc/a.out",symbols-loaded="0",loaded_addr="-",size="0"</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000000004004df",func="main",file="main.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/main.c",line="6",times="0",original-location="main"}</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000000004004df",func="main",file="main.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/main.c",line="6",times="0",original-location="main"}</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^error,msg="process launch failed: 'A' packet returned an error: -1"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^error,msg="Command 'exec-step-instruction'. Thread ID invalid"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^error,msg="Command 'exec-next-instruction'. Thread ID invalid"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^error,msg="this SBThread object is invalid"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default">^done</div><div class="gmail_default">(gdb)</div><div class="gmail_default"><br></div><div class="gmail_default">exec-run executes fine in synchronous mode(the only bad thing here is that lldb-mi doesn't react to any external events like SIGSTOP - ctrl+C, while lldb does). All previous logs were made in asynchronous mode and are wrong.</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 14, 2018 at 2:36 AM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><br><div><br><blockquote type="cite"><div>On Aug 13, 2018, at 4:19 PM, Александр Поляков <<a href="mailto:polyakov.alx@gmail.com" target="_blank">polyakov.alx@gmail.com</a>> wrote:</div><br class="m_8986911835332619808Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Yes, I do, I'm able to pass any command to lldb-mi before the breakpoint is hit. I guess that making exec-run to block the control until the process stops might be the solution we are looking for.</div></div></div></blockquote><div><br></div><div>Right. I believe that it should (in synchronous mode) behave like "run" in the normal lldb command interpreter and block until the process has stopped. You could look at differences in the implementation of -exec-run and "run" in the command interpreter first.</div><div><br></div><div>-- adrian</div></div><br></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:12.8px">Alexander</span><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>