@@ -19,6 +19,11 @@ def should_stop(self, event):
1919 def should_step (self ):
2020 return False
2121
22+ def stop_description (self , stream ):
23+ if self .child_thread_plan .IsPlanComplete ():
24+ return self .child_thread_plan .GetDescription (stream )
25+ return True
26+
2227 def queue_child_thread_plan (self ):
2328 return None
2429
@@ -39,19 +44,18 @@ def queue_child_thread_plan(self):
3944# This plan does a step-over until a variable changes value.
4045class StepUntil (StepWithChild ):
4146 def __init__ (self , thread_plan , args_data , dict ):
47+ self .thread_plan = thread_plan
4248 self .frame = thread_plan .GetThread ().frames [0 ]
4349 self .target = thread_plan .GetThread ().GetProcess ().GetTarget ()
44- func_entry = args_data .GetValueForKey ("variable_name" )
50+ var_entry = args_data .GetValueForKey ("variable_name" )
4551
46- if not func_entry .IsValid ():
52+ if not var_entry .IsValid ():
4753 print ("Did not get a valid entry for variable_name" )
48- func_name = func_entry .GetStringValue (100 )
54+ self . var_name = var_entry .GetStringValue (100 )
4955
50- self .value = self .frame .FindVariable (func_name )
56+ self .value = self .frame .FindVariable (self . var_name )
5157 if self .value .GetError ().Fail ():
5258 print ("Failed to get foo value: %s" % (self .value .GetError ().GetCString ()))
53- else :
54- print ("'foo' value: %d" % (self .value .GetValueAsUnsigned ()))
5559
5660 StepWithChild .__init__ (self , thread_plan )
5761
@@ -70,17 +74,23 @@ def should_stop(self, event):
7074
7175 # If we've stepped out of this frame, stop.
7276 if not self .frame .IsValid ():
77+ self .thread_plan .SetPlanComplete (True )
7378 return True
7479
7580 if not self .value .IsValid ():
81+ self .thread_plan .SetPlanComplete (True )
7682 return True
7783
7884 if not self .value .GetValueDidChange ():
7985 self .child_thread_plan = self .queue_child_thread_plan ()
8086 return False
8187 else :
88+ self .thread_plan .SetPlanComplete (True )
8289 return True
8390
91+ def stop_description (self , stream ):
92+ stream .Print (f"Stepped until { self .var_name } changed." )
93+
8494# This plan does nothing, but sets stop_mode to the
8595# value of GetStopOthers for this plan.
8696class StepReportsStopOthers ():
@@ -92,7 +102,6 @@ def __init__(self, thread_plan, args_data, dict):
92102
93103 def should_stop (self , event ):
94104 self .thread_plan .SetPlanComplete (True )
95- print ("Called in should_stop" )
96105 StepReportsStopOthers .stop_mode_dict [self .key ] = self .thread_plan .GetStopOthers ()
97106 return True
98107
0 commit comments