<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 13, 2018, at 11:54 AM, Александр Поляков <<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;">Oops, I made a mistake, I typed break-insert main. Here is the right output:<br class=""><br class=""><div class="gmail_default">build/bin/lldb-mi a.out </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">=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">-exec-run</div><div class="gmail_default">^running</div><div class="gmail_default">=thread-group-started,id="i1",pid="6406"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=thread-created,id="1",group-id="i1"</div><div class="gmail_default">=thread-selected,id="1"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" class="">ld-2.23.so</a>",target-name="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" class="">ld-2.23.so</a>",host-name="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" class="">ld-2.23.so</a>",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" class="">ld-2.23.so</a>",loaded_addr="-",size="0"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="[vdso]",target-name="[vdso]",host-name="[vdso]",symbols-loaded="1",symbols-path="",loaded_addr="0x00007ffff7ffa000",size="0"</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">(gdb)</div><div class="gmail_default">*running,thread-id="all"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://libc-2.23.so/" class="">libc-2.23.so</a>",loaded_addr="-",size="0"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://libc-2.23.so/" class="">libc-2.23.so</a>",loaded_addr="-",size="0"</div><div class="gmail_default">-break-insert func</div><div class="gmail_default">^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400514",func="func",file="test.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/test.c",line="2",times="0",original-location="func"}</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400514",func="func",file="test.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/test.c",line="2",times="0",original-location="func"}</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400514",func="func",file="test.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/test.c",line="2",times="0",original-location="func"}</div><div class="gmail_default">(gdb)</div><div class="gmail_default">-exec-next</div><div class="gmail_default">^error,msg="Resume timed out."</div><div class="gmail_default">(gdb)</div><div class="gmail_default">(gdb)</div><div class="gmail_default">*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={level="0",addr="0x0000000000400514",func="func",args=[],file="test.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/test.c",line="2"},thread-id="1",stopped-threads="all"</div></div></div></div></blockquote><div><br class=""></div><div>Do you get control back before the breakpoint is hit? If yes, should -exec-run block until the process stops (in synchronous mode)?</div><div><br class=""></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">(gdb)</div><div class="gmail_default">*running,thread-id="all"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">(gdb)</div><div class="gmail_default">*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={level="0",addr="0x0000000000400514",func="func",args=[],file="test.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/test.c",line="2"},thread-id="1",stopped-threads="all"</div><div class="gmail_default">(gdb)<br class=""></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Aug 13, 2018 at 9:40 PM Александр Поляков <<a href="mailto:polyakov.alx@gmail.com" class="">polyakov.alx@gmail.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 dir="ltr" class=""><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;">Sure, this is the log with the typed commands:<br class=""><br class=""><div class="gmail_default">build/bin/lldb-mi a.out </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">=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">-exec-run</div><div class="gmail_default">^running</div><div class="gmail_default">=thread-group-started,id="i1",pid="4410"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=thread-created,id="1",group-id="i1"</div><div class="gmail_default">=thread-selected,id="1"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" target="_blank" class="">ld-2.23.so</a>",target-name="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" target="_blank" class="">ld-2.23.so</a>",host-name="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" target="_blank" class="">ld-2.23.so</a>",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" target="_blank" class="">ld-2.23.so</a>",loaded_addr="-",size="0"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="[vdso]",target-name="[vdso]",host-name="[vdso]",symbols-loaded="1",symbols-path="",loaded_addr="0x00007ffff7ffa000",size="0"</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">(gdb)</div><div class="gmail_default">*running,thread-id="all"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://libc-2.23.so/" target="_blank" class="">libc-2.23.so</a>",loaded_addr="-",size="0"</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://libc-2.23.so/" target="_blank" class="">libc-2.23.so</a>",loaded_addr="-",size="0"</div><div class="gmail_default">-break-insert main</div><div class="gmail_default">^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000040052f",func="main",file="test.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/test.c",line="7",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="0x000000000040052f",func="main",file="test.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/test.c",line="7",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="0x000000000040052f",func="main",file="test.c",fullname="/home/alexander/workspace/gsoc/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/test.c",line="7",times="0",original-location="main"}</div><div class="gmail_default">(gdb)</div><div class="gmail_default">-exec-next</div><div class="gmail_default">^error,msg="Resume timed out."</div><div class="gmail_default">(gdb)</div><div class="gmail_default">(gdb)</div><div class="gmail_default">=thread-exited,id="1",group-id="i1"</div><div class="gmail_default">=thread-group-exited,id="i1",exit-code="0"</div><div class="gmail_default">*stopped,reason="exited-normally"</div><div class="gmail_default">(gdb)<br class=""><br class="">No one of the commands isn't a blocking one, but I think that -exec-run should be blocking.</div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Aug 13, 2018 at 8:10 PM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" 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"><br class="">
<br class="">
> On Aug 11, 2018, at 3:58 AM, Александр Поляков <<a href="mailto:polyakov.alx@gmail.com" target="_blank" class="">polyakov.alx@gmail.com</a>> wrote:<br class="">
> <br class="">
> I reproduced the test you suggested and got following output:<br class="">
> <br class="">
> build/bin/lldb-mi --synchronous a.out < llvm/tools/lldb/lit/tools/lldb-mi/exec/lldb-mi-fail.test <br class="">
> (gdb)<br class="">
> -file-exec-and-symbols "a.out"<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> =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"<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000000000f",func="??",file="??",fullname="??/??",line="0",times="0",original-location="f"}<br class="">
> (gdb)<br class="">
> =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000000000f",func="??",file="??",fullname="??/??",line="0",times="0",original-location="f"}<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^running<br class="">
> =thread-group-started,id="i1",pid="5075"<br class="">
> (gdb)<br class="">
> =thread-created,id="1",group-id="i1"<br class="">
> =thread-selected,id="1"<br class="">
> (gdb)<br class="">
> =library-loaded,id="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" rel="noreferrer" target="_blank" class="">ld-2.23.so</a>",target-name="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" rel="noreferrer" target="_blank" class="">ld-2.23.so</a>",host-name="/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" rel="noreferrer" target="_blank" class="">ld-2.23.so</a>",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://ld-2.23.so/" rel="noreferrer" target="_blank" class="">ld-2.23.so</a>",loaded_addr="-",size="0"<br class="">
> (gdb)<br class="">
> =library-loaded,id="[vdso]",target-name="[vdso]",host-name="[vdso]",symbols-loaded="1",symbols-path="",loaded_addr="0x00007ffff7ffa000",size="0"<br class="">
> (gdb)<br class="">
> =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"<br class="">
> (gdb)<br class="">
> =library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://libc-2.23.so/" rel="noreferrer" target="_blank" class="">libc-2.23.so</a>",loaded_addr="-",size="0"<br class="">
> (gdb)<br class="">
> =library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="1",symbols-path="/usr/lib/debug/lib/x86_64-linux-gnu/<a href="http://libc-2.23.so/" rel="noreferrer" target="_blank" class="">libc-2.23.so</a>",loaded_addr="-",size="0"<br class="">
> (gdb)<br class="">
> =thread-exited,id="1",group-id="i1"<br class="">
> =thread-group-exited,id="i1",exit-code="0"<br class="">
> *stopped,reason="exited-normally"<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> ^error,msg="Resume timed out."<br class="">
> (gdb)<br class="">
> ^done<br class="">
> (gdb)<br class="">
> <br class="">
> As a command that needs a breakpoint to be hit I chose the -exec-next --thread 1. It's the same error which is seen on the bots.<br class="">
<br class="">
Can you help me understand the order in which events happened in that log? I don't see the -exec-next command in the log. If you type in the commands manually, does it become obvious which ones are blocking and which ones aren't (but should be)?<br class="">
<br class="">
-- adrian </blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="m_-263605174275176844gmail_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>
</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>