[PATCH] LLDB: Don't crash when creating a SBTarget programmatically
Michael Gottesman
mgottesman at apple.com
Mon Sep 16 12:08:38 PDT 2013
I think you sent this to the wrong list. The lldb commits list is:
lldb-commits at cs.uiuc.edu
and the dev list is:
lldb-dev at cs.uiuc.edu
Michael
On Sep 12, 2013, at 7:13 AM, Michail Pishchagin <mblsha at gmail.com> wrote:
> Hi, this is my first patch, hopefully I've done it the right way :-)
>
> I'm automatically attaching to child processes by a custom breakpoint action written in Python:
>
> def breakpoint_callback(frame, bp_loc, dict):
> old_target = lldb.target
> # If we just use lldb.process here, it won't continue afterwards :-(
> thread = frame.GetThread()
> old_process = thread.GetProcess()
>
> handle = int(frame.FindVariable("handle").GetValue())
> # After we attach to PID it will automatically switch to correct executable
> exe = old_target.GetExecutable().fullpath
> new_target = lldb.debugger.CreateTarget(exe) # <-- crash here
>
> I'm not using any remote sessions, everything is local. And my fix makes it work correctly.
>
> -Michail
> <dont-crash-when-creating-targets.diff>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130916/2301eec4/attachment.html>
More information about the llvm-commits
mailing list