<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 22, 2014 at 2:59 PM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey Greg,<div><br></div><div>Where is the code in lldb that does the final 'resume' when we get the inferior stopped at the entry point with eLaunchFlagDebug?</div>
<div><br></div><div>I've got my local Linux debugging working with llgs with a band-aid fix to address the race condition, but I do consistently stop at the entry point to the program (the exec stop for the final exec into the true inferior process).</div>
<div><br></div><div>Another symptom I'm seeing (maybe it is related) is that lldb doesn't seem to know what the target is. IOW, I see this kind of behavior:</div><div><br></div><div><div><font size="1" face="courier new, monospace">tfiala@tfiala2:/mnt/ssd/work/macosx.sync/mp-git/build-debug$ bin/lldb -- ~/play/loops/loops</font></div>
<div><font size="1" face="courier new, monospace">(lldb) target create "/usr/local/google/home/tfiala/play/loops/loops"</font></div><div><font size="1" face="courier new, monospace">Current executable set to '/usr/local/google/home/tfiala/play/loops/loops' (x86_64).</font></div>
<div><font size="1" face="courier new, monospace">(lldb) run</font></div><div><font size="1" face="courier new, monospace">Process 20363 launched: '/usr/local/google/home/tfiala/play/loops/loops' (x86_64)</font></div>
<div><font size="1" face="courier new, monospace">Process 20363 stopped</font></div><div><font size="1" face="courier new, monospace">* thread #1: tid = 20363, 0x00007f9b806f02d0, name = 'loops', stop reason = exec</font></div>
<div><font size="1" face="courier new, monospace"> frame #0: 0x00007f9b806f02d0</font></div><div><font size="1" face="courier new, monospace">-> 0x7f9b806f02d0: movq %rsp, %rdi</font></div><div><font size="1" face="courier new, monospace"> 0x7f9b806f02d3: callq 0x7f9b806f3a70</font></div>
<div><font size="1" face="courier new, monospace"> 0x7f9b806f02d8: movq %rax, %r12</font></div><div><font size="1" face="courier new, monospace"> 0x7f9b806f02db: movl 0x221b17(%rip), %eax</font></div><div><font size="1" face="courier new, monospace"><br>
</font></div><div>// ^= here you see the behavior where I stop at the final exec (as I'd expect at the private level, but I'd expect lldb to want to continue it at the public level).</div><div><br></div><div><font size="1" face="courier new, monospace">(lldb) c</font></div>
<div><font size="1" face="courier new, monospace">Process 20363 resuming</font></div><div><font size="1" face="courier new, monospace">i = 0</font></div><div><font size="1" face="courier new, monospace">i = 1</font></div>
<div><font size="1" face="courier new, monospace">i = 2</font></div><div><font size="1" face="courier new, monospace">i = 3</font></div><div><font size="1" face="courier new, monospace">i = 4</font></div><div><font size="1" face="courier new, monospace">i = 5</font></div>
<div><font size="1" face="courier new, monospace">i = 6</font></div><div><font size="1" face="courier new, monospace">i = 7</font></div><div><font size="1" face="courier new, monospace">i = 8</font></div><div><font size="1" face="courier new, monospace">i = 9</font></div>
<div><font size="1" face="courier new, monospace">Process 20363 exited with status = 0 (0x00000000) </font></div><div><font size="1" face="courier new, monospace">(lldb) run</font></div><div><font size="1" face="courier new, monospace">error: no file in target, create a debug target using the 'target create' command</font></div>
<div><br></div><div>// ^= Huh? I should be able to re-run :-)</div><div><br></div><div>(lldb) </div></div></div></blockquote><div><br></div><div>On this part, I think I may not be clearing out everything that needs to be cleared out on an exec. I'm going to trace what debugserver/lldb does on MacOSX when an exec is detected to see if I'm missing anything on the Linux llgs/lldb side.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'">
<tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px">
Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="color:rgb(34,34,34);background-color:rgb(255,255,204)">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div></div>