[lldb-dev] issues with python scripting in LLDB

michael michael at tweakoz.com
Thu Nov 3 23:58:57 PDT 2011


I have a script, something like:

#########################
import lldb
import sys
import os
import time

def StepOver(debugger, args, result, dict):
   arg_split = args.split(" ")
   print type(arg_split)
   count = int(arg_split[0])
   for i in range(0,count):
     lldb.thread.StepOver(lldb.eOnlyThisThread)
     print "step<%d>"%i
     time.sleep(.75)
##########################

I also have an command shortcut assigned to call it.

I have 2 issues:
1. I have to sleep in the loop (for some period over some threshold),
     or the script seems to lock up.
     Is this due to some race condition ?
2. how can I force a console flush inside the loop, currently the console
     is deferred until the script returns. Is there some sort of yield
     or console flush command?

Thanks,

mtm




More information about the lldb-dev mailing list