<div dir="ltr"><div>Hi,</div><div><br></div><div>I have a small script to debug a program in OSX that looks more or less like this:<br><br>debugger = lldb.SBDebugger.Create()<br>target = debugger.CreateTargetWithFileAndArch(exe, lldb.LLDB_ARCH_DEFAULT_64BIT)<br>

launch_info = lldb.SBLaunchInfo(args)<br>launch_info.SetLaunchFlags(lldb.eLaunchFlagNone)<br>error = lldb.SBError()<br>process = target.Launch(launch_info, error)<br>if not error.Success():<br>    print args, str(error)<br>

    return<br><br>listener = lldb.SBListener("event_listener")<br>process.GetBroadcaster().AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged)<br>done = 0<br>while not done:<br>    event = lldb.SBEvent()<br>

    if listener.WaitForEvent(10, event):<br>      state = lldb.SBProcess.GetStateFromEvent(event)<br>      print state<br>      for thread in process:<br>        print thread, thread.GetFrameAtIndex(0)<br>      process.Continue()<br>

    else:<br>      done = 1<br><br>My intention is to debug the target with some kind of timeout, that's why I'm trying to use the async mode and use the timeout in WaitForEvent(). The problem that I'm facing is that once WaitForEvent() succeeds, there's no way I can get access to the thread information (for example to get frame info for each thread). This is the output from the script:<br>

<br>5<br>SBThread: tid = 0x2b9672 No value<br>SBThread: tid = 0x2b9686 No value<br>SBThread: tid = 0x2b9687 No value<br>SBThread: tid = 0x2b9689 No value</div>SBThread: tid = 0x2b968a No value<br>SBThread: tid = 0x2b96be No value<br>

SBThread: tid = 0x2b96bf No value<br>SBThread: tid = 0x2b96c0 No value<br><div><br></div><div>Any ideas? Is there anything wrong with my approach?</div><div><br></div><div>Thanks,</div><div>HG</div></div>