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 --- .../lldb-server/TestGdbRemoteRegisterState.py | 28 ++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py') diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py index 63a8995c672..b484bdcc4d5 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py @@ -1,12 +1,12 @@ from __future__ import print_function - import gdbremote_testcase from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil + class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase): """Test QSaveRegisterState/QRestoreRegisterState support.""" @@ -15,7 +15,8 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase): def grp_register_save_restore_works(self, with_suffix): # Start up the process, use thread suffix, grab main thread id. inferior_args = ["message:main entered", "sleep:5"] - procs = self.prep_debug_monitor_and_inferior(inferior_args=inferior_args) + procs = self.prep_debug_monitor_and_inferior( + inferior_args=inferior_args) self.add_process_info_collection_packets() self.add_register_info_collection_packets() @@ -26,8 +27,9 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase): # Start the inferior... "read packet: $c#63", # ... match output.... - { "type":"output_match", "regex":self.maybe_strict_output_regex(r"message:main entered\r\n") }, - ], True) + {"type": "output_match", "regex": self.maybe_strict_output_regex( + r"message:main entered\r\n")}, + ], True) # ... then interrupt. self.add_interrupt_packets() @@ -44,8 +46,10 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertIsNotNone(reg_infos) self.add_lldb_register_index(reg_infos) - # Pull out the register infos that we think we can bit flip successfully. - gpr_reg_infos = [reg_info for reg_info in reg_infos if self.is_bit_flippable_register(reg_info)] + # Pull out the register infos that we think we can bit flip + # successfully. + gpr_reg_infos = [ + reg_info for reg_info in reg_infos if self.is_bit_flippable_register(reg_info)] self.assertTrue(len(gpr_reg_infos) > 0) # Gather thread info. @@ -71,15 +75,18 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase): # print("saved register state id: {}".format(state_id)) # Remember initial register values. - initial_reg_values = self.read_register_values(gpr_reg_infos, endian, thread_id=thread_id) + initial_reg_values = self.read_register_values( + gpr_reg_infos, endian, thread_id=thread_id) # print("initial_reg_values: {}".format(initial_reg_values)) # Flip gpr register values. - (successful_writes, failed_writes) = self.flip_all_bits_in_each_register_value(gpr_reg_infos, endian, thread_id=thread_id) + (successful_writes, failed_writes) = self.flip_all_bits_in_each_register_value( + gpr_reg_infos, endian, thread_id=thread_id) # print("successful writes: {}, failed writes: {}".format(successful_writes, failed_writes)) self.assertTrue(successful_writes > 0) - flipped_reg_values = self.read_register_values(gpr_reg_infos, endian, thread_id=thread_id) + flipped_reg_values = self.read_register_values( + gpr_reg_infos, endian, thread_id=thread_id) # print("flipped_reg_values: {}".format(flipped_reg_values)) # Restore register values. @@ -90,7 +97,8 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertIsNotNone(context) # Verify registers match initial register values. - final_reg_values = self.read_register_values(gpr_reg_infos, endian, thread_id=thread_id) + final_reg_values = self.read_register_values( + gpr_reg_infos, endian, thread_id=thread_id) # print("final_reg_values: {}".format(final_reg_values)) self.assertIsNotNone(final_reg_values) self.assertEqual(final_reg_values, initial_reg_values) -- cgit v1.2.3