<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 14, 2018, at 12:11 PM, Александр Поляков <<a href="mailto:polyakov.alx@gmail.com" class="">polyakov.alx@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;">It seems that the real problem is that sometimes lldb-mi can't launch a process:<br class=""><br class=""></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><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></div></div></blockquote><div><br class=""></div><div>Do you think you might be able to improve the error message here and get at the underlying failure?</div><div><br class=""></div><div>-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><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 class=""></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 class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Aug 14, 2018 at 2:36 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:<br class=""></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" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Aug 13, 2018, at 4:19 PM, Александр Поляков <<a href="mailto:polyakov.alx@gmail.com" target="_blank" class="">polyakov.alx@gmail.com</a>> wrote:</div><br class="m_8986911835332619808Apple-interchange-newline"><div class=""><div dir="ltr" class=""><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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">-- adrian</div></div><br class=""></div></blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><span style="font-family: arial, helvetica, sans-serif; font-size: 12.8px;" class="">Alexander</span><br class=""></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></blockquote></div><br class=""></body></html>