diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py b/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py index f93559af736..4133cbbe608 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py @@ -38,18 +38,29 @@ class StepScripted(StepWithChild): # This plan does a step-over until a variable changes value. class StepUntil(StepWithChild): - def __init__(self, thread_plan, dict): + def __init__(self, thread_plan, args_data, dict): self.frame = thread_plan.GetThread().frames[0] self.target = thread_plan.GetThread().GetProcess().GetTarget() - self.value = self.frame.FindVariable("foo") + func_entry = args_data.GetValueForKey("variable_name") + + if not func_entry.IsValid(): + print("Did not get a valid entry for variable_name") + func_name = func_entry.GetStringValue(100) + + self.value = self.frame.FindVariable(func_name) + if self.value.GetError().Fail(): + print("Failed to get foo value: %s"%(self.value.GetError().GetCString())) + else: + print("'foo' value: %d"%(self.value.GetValueAsUnsigned())) + StepWithChild.__init__(self, thread_plan) + def queue_child_thread_plan(self): le = self.frame.GetLineEntry() start_addr = le.GetStartAddress() start = start_addr.GetLoadAddress(self.target) end = le.GetEndAddress().GetLoadAddress(self.target) - print("Stepping from 0x%x to 0x%x (0x%x)"%(start, end, end - start)) return self.thread_plan.QueueThreadPlanForStepOverRange(start_addr, end - start) |