Index: lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py =================================================================== --- lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py +++ lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py @@ -106,9 +106,9 @@ self.thread = threads[0] def do_step_out_past_nodebug(self): - # The first step out takes us to the called_from_nodebug frame, just to make sure setting - # step-out-avoid-nodebug doesn't change the behavior in frames with - # debug info. + # The first step out takes us to the called_from_nodebug + # frame, just to make sure setting step-out-avoid-nodebug + # doesn't change the behavior in frames with debug info. self.thread.StepOut() self.hit_correct_line( "intermediate_return_value = called_from_nodebug_actual(some_value)" @@ -119,33 +119,41 @@ ) def do_step_over_past_nodebug(self): - self.thread.StepOver() + while self.thread.frame[0].name == "called_from_nodebug_actual": + self.thread.StepOver() self.hit_correct_line( "intermediate_return_value = called_from_nodebug_actual(some_value)" ) self.thread.StepOver() self.hit_correct_line("return intermediate_return_value") - self.thread.StepOver() - # Note, lldb doesn't follow gdb's distinction between "step-out" and "step-over/step-in" - # when exiting a frame. In all cases we leave the pc at the point where we exited the - # frame. In gdb, step-over/step-in move to the end of the line they stepped out to. - # If we ever change this we will need to fix this test. + while self.thread.frame[0].name == "called_from_nodebug": + self.thread.StepOver() + # Note, lldb doesn't follow gdb's distinction between + # "step-out" and "step-over/step-in" when exiting a frame. In + # all cases we leave the pc at the point where we exited the + # frame. In gdb, step-over/step-in move to the end of the + # line they stepped out to. If we ever change this we will + # need to fix this test. self.hit_correct_line( "int return_value = no_debug_caller(5, called_from_nodebug)" ) def do_step_in_past_nodebug(self): - self.thread.StepInto() + while self.thread.frame[0].name == "called_from_nodebug_actual": + self.thread.StepInto() self.hit_correct_line( "intermediate_return_value = called_from_nodebug_actual(some_value)" ) self.thread.StepInto() self.hit_correct_line("return intermediate_return_value") - self.thread.StepInto() - # Note, lldb doesn't follow gdb's distinction between "step-out" and "step-over/step-in" - # when exiting a frame. In all cases we leave the pc at the point where we exited the - # frame. In gdb, step-over/step-in move to the end of the line they stepped out to. - # If we ever change this we will need to fix this test. + while self.thread.frame[0].name == "called_from_nodebug": + self.thread.StepInto() + # Note, lldb doesn't follow gdb's distinction between + # "step-out" and "step-over/step-in" when exiting a frame. In + # all cases we leave the pc at the point where we exited the + # frame. In gdb, step-over/step-in move to the end of the + # line they stepped out to. If we ever change this we will + # need to fix this test. self.hit_correct_line( "int return_value = no_debug_caller(5, called_from_nodebug)" ) Index: lldb/test/API/functionalities/step-avoids-no-debug/with-debug.c =================================================================== --- lldb/test/API/functionalities/step-avoids-no-debug/with-debug.c +++ lldb/test/API/functionalities/step-avoids-no-debug/with-debug.c @@ -4,26 +4,20 @@ extern int no_debug_caller (int, debug_callee); -int -called_from_nodebug_actual(int some_value) -{ +int called_from_nodebug_actual(int some_value) { int return_value = 0; - return_value = printf ("Length: %d.\n", some_value); + return_value = printf("Length: %d.\n", some_value); return return_value; // Stop here and step out of me } -int -called_from_nodebug(int some_value) -{ +int called_from_nodebug(int some_value) { int intermediate_return_value = 0; intermediate_return_value = called_from_nodebug_actual(some_value); return intermediate_return_value; } -int -main() -{ +int main() { int return_value = no_debug_caller(5, called_from_nodebug); - printf ("I got: %d.\n", return_value); + printf("I got: %d.\n", return_value); return 0; } Index: lldb/test/API/functionalities/step-avoids-no-debug/without-debug.c =================================================================== --- lldb/test/API/functionalities/step-avoids-no-debug/without-debug.c +++ lldb/test/API/functionalities/step-avoids-no-debug/without-debug.c @@ -1,16 +1,12 @@ -typedef int (*debug_callee) (int); +typedef int (*debug_callee)(int); -int -no_debug_caller_intermediate(int input, debug_callee callee) -{ +int no_debug_caller_intermediate(int input, debug_callee callee) { int return_value = 0; return_value = callee(input); return return_value; } -int -no_debug_caller (int input, debug_callee callee) -{ +int no_debug_caller(int input, debug_callee callee) { int return_value = 0; return_value = no_debug_caller_intermediate (input, callee); return return_value;