It is trivial to write a ScriptedThreadPlan to do "step until the variable 'foo' changes value". It is equally easy to write one that does "step until the variable 'bar' changes value". But you would have to write a different Python class for each of these tasks, since there's no way to pass parameters into the ThreadPlan on creation.
This patch adds that ability. You can say:
(lldb) thread step-scripted -C Module.ThreadPlan -k variable_name -v foo
lldb will package the key and value into an SBStructuredData dictionary, and pass that to the init method of the ThreadPlan class. Then the ThreadPlan can fetch the value for that key from the dictionary and watch that variable.
I also added an SB API that allows you to pass any SBStructuredData to SBThread.StepUsingScriptedThreadPlan, if you need to pass in something more complex than a simple key/value dictionary.
This revision depends on:
Not sure who to put on to review this, most of the folks who worked actively on the PythonObjects aren't really active anymore... I added folks who touched some of the relevant files recently...