From b9c1b51e45b845debb76d8658edabca70ca56079 Mon Sep 17 00:00:00 2001 From: Kate Stone Date: Tue, 6 Sep 2016 20:57:50 +0000 Subject: *** This commit represents a complete reformatting of the LLDB source code *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751 --- .../test/lang/c/step-target/TestStepTarget.py | 58 +++++++++++++--------- 1 file changed, 35 insertions(+), 23 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py') diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py b/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py index 2bd72434d39..b1aa98c50ba 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py +++ b/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py @@ -2,12 +2,14 @@ from __future__ import print_function -import os, time +import os +import time import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil + class TestStepTarget(TestBase): mydir = TestBase.compute_mydir(__file__) @@ -23,30 +25,32 @@ class TestStepTarget(TestBase): self.end_line = line_number(self.main_source, "All done") @add_test_categories(['pyapi']) - - def get_to_start (self): + def get_to_start(self): self.build() exe = os.path.join(os.getcwd(), "a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) - self.main_source_spec = lldb.SBFileSpec (self.main_source) + self.main_source_spec = lldb.SBFileSpec(self.main_source) - break_in_main = target.BreakpointCreateBySourceRegex ('Break here to try targetted stepping', self.main_source_spec) + break_in_main = target.BreakpointCreateBySourceRegex( + 'Break here to try targetted stepping', self.main_source_spec) self.assertTrue(break_in_main, VALID_BREAKPOINT) - self.assertTrue(break_in_main.GetNumLocations() > 0,"Has locations.") + self.assertTrue(break_in_main.GetNumLocations() > 0, "Has locations.") # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, self.get_process_working_directory()) + process = target.LaunchSimple( + None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # The stop reason of the thread should be breakpoint. - threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_in_main) + threads = lldbutil.get_threads_stopped_at_breakpoint( + process, break_in_main) if len(threads) != 1: - self.fail ("Failed to stop at first breakpoint in main.") + self.fail("Failed to stop at first breakpoint in main.") thread = threads[0] return thread @@ -60,7 +64,7 @@ class TestStepTarget(TestBase): thread.StepInto("lotsOfArgs", self.end_line, error) frame = thread.frames[0] - self.assertTrue (frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.") + self.assertTrue(frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.") def test_with_end_line_bad_name(self): """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms.""" @@ -70,7 +74,9 @@ class TestStepTarget(TestBase): error = lldb.SBError() thread.StepInto("lotsOfArgssss", self.end_line, error) frame = thread.frames[0] - self.assertTrue (frame.line_entry.line == self.end_line, "Stepped to the block end.") + self.assertTrue( + frame.line_entry.line == self.end_line, + "Stepped to the block end.") def test_with_end_line_deeper(self): """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms.""" @@ -80,7 +86,7 @@ class TestStepTarget(TestBase): error = lldb.SBError() thread.StepInto("modifyInt", self.end_line, error) frame = thread.frames[0] - self.assertTrue (frame.name == "modifyInt", "Stepped to modifyInt.") + self.assertTrue(frame.name == "modifyInt", "Stepped to modifyInt.") def test_with_command_and_block(self): """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms.""" @@ -88,11 +94,14 @@ class TestStepTarget(TestBase): thread = self.get_to_start() result = lldb.SBCommandReturnObject() - self.dbg.GetCommandInterpreter().HandleCommand('thread step-in -t "lotsOfArgs" -e block', result) - self.assertTrue(result.Succeeded(), "thread step-in command succeeded.") + self.dbg.GetCommandInterpreter().HandleCommand( + 'thread step-in -t "lotsOfArgs" -e block', result) + self.assertTrue( + result.Succeeded(), + "thread step-in command succeeded.") frame = thread.frames[0] - self.assertTrue (frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.") + self.assertTrue(frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.") def test_with_command_and_block_and_bad_name(self): """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms.""" @@ -100,14 +109,17 @@ class TestStepTarget(TestBase): thread = self.get_to_start() result = lldb.SBCommandReturnObject() - self.dbg.GetCommandInterpreter().HandleCommand('thread step-in -t "lotsOfArgsssss" -e block', result) - self.assertTrue(result.Succeeded(), "thread step-in command succeeded.") + self.dbg.GetCommandInterpreter().HandleCommand( + 'thread step-in -t "lotsOfArgsssss" -e block', result) + self.assertTrue( + result.Succeeded(), + "thread step-in command succeeded.") frame = thread.frames[0] - self.assertTrue (frame.name == "main", "Stepped back out to main.") - # end_line is set to the line after the containing block. Check that we got there: - self.assertTrue(frame.line_entry.line == self.end_line, "Got out of the block") - - - + self.assertTrue(frame.name == "main", "Stepped back out to main.") + # end_line is set to the line after the containing block. Check that + # we got there: + self.assertTrue( + frame.line_entry.line == self.end_line, + "Got out of the block") -- cgit v1.2.3