<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I think you sent this to the wrong list. The lldb commits list is:<div><br></div><div><a href="mailto:lldb-commits@cs.uiuc.edu" style="font-family: Times; font-size: medium; background-color: rgb(255, 255, 255);">lldb-commits@cs.uiuc.edu</a></div><div><br></div><div>and the dev list is:</div><div><br></div><div><a href="mailto:lldb-dev@cs.uiuc.edu" style="font-family: Times; font-size: medium; background-color: rgb(255, 255, 255);">lldb-dev@cs.uiuc.edu</a></div><div><br></div><div>Michael</div><div><br><div><div>On Sep 12, 2013, at 7:13 AM, Michail Pishchagin <<a href="mailto:mblsha@gmail.com">mblsha@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi, this is my first patch, hopefully I've done it the right way :-)<br><div class="gmail_quote"><div dir="ltr"><div><br></div><div>I'm automatically attaching to child processes by a custom breakpoint action written in Python:</div>

<div><br></div><div><div>def breakpoint_callback(frame, bp_loc, dict):</div><div>    old_target = lldb.target</div><div>    # If we just use lldb.process here, it won't continue afterwards :-(</div><div>    thread = frame.GetThread()</div>

<div>    old_process = thread.GetProcess()</div><div><br></div><div>    handle = int(frame.FindVariable("handle").GetValue())</div><div>    # After we attach to PID it will automatically switch to correct executable</div>

<div>    exe = old_target.GetExecutable().fullpath</div><div>    new_target = lldb.debugger.CreateTarget(exe)  # <-- crash here</div></div><div><br></div><div>I'm not using any remote sessions, everything is local. And my fix makes it work correctly.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div>-Michail</font></span></div></div></div>
<span><dont-crash-when-creating-targets.diff></span>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></div></body></html>