gdb: reformat Python files with black 23.1.0
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 27 Feb 2023 01:13:55 +0000 (20:13 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 27 Feb 2023 18:28:32 +0000 (13:28 -0500)
Change-Id: Ie8ec8870a16d71c5858f5d08958309d23c318302
Reviewed-By: Tom Tromey <tom@tromey.com>
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
13 files changed:
gdb/python/lib/gdb/FrameDecorator.py
gdb/python/lib/gdb/command/frame_filters.py
gdb/python/lib/gdb/dap/server.py
gdb/python/lib/gdb/printing.py
gdb/testsuite/gdb.multi/multi-target-info-inferiors.py
gdb/testsuite/gdb.perf/backtrace.py
gdb/testsuite/gdb.python/py-framefilter-addr.py
gdb/testsuite/gdb.python/py-framefilter.py
gdb/testsuite/gdb.python/py-inferior-leak.py
gdb/testsuite/gdb.python/py-prettyprint.py
gdb/testsuite/gdb.python/py-recurse-unwind.py
gdb/testsuite/gdb.python/py-send-packet.py
gdb/testsuite/gdb.python/tui-window.py

index 82be4fc4ecb751666c6d595150bad8a19d7f6d91..6773780735b44a48cae30fa1b9c21f56ee6aa733 100644 (file)
@@ -64,7 +64,6 @@ class FrameDecorator(object):
             or frame.type() == gdb.DUMMY_FRAME
             or frame.type() == gdb.SIGTRAMP_FRAME
         ):
-
             return True
 
         return False
index 0fca0e78dcbf229029ecde20792cc7a7d6e952f8..a88de49cfea15ba00fcf7efe88241b1e72400c07 100644 (file)
@@ -20,6 +20,7 @@ import sys
 import gdb
 import gdb.frames
 
+
 # GDB Commands.
 class SetFilterPrefixCmd(gdb.Command):
     """Prefix command for 'set' frame-filter related operations."""
index f8cb6170a9692bce605f22f5f9265be00817d757..7013cc3bff1410915aa96e5156f86569d1aeb6e8 100644 (file)
@@ -116,7 +116,7 @@ class Server:
             self._send_json(result)
             events = self.delayed_events
             self.delayed_events = []
-            for (event, body) in events:
+            for event, body in events:
                 self.send_event(event, body)
         # Got the terminate request.  This is handled by the
         # JSON-writing thread, so that we can ensure that all
index 740a96e60eb4b50e1696eedb78db93adcd620b54..1f724eebb2b8eba99558db3fbfc6503d238d5042 100644 (file)
@@ -228,7 +228,7 @@ class _EnumInstance:
         flag_list = []
         v = int(self.val)
         any_found = False
-        for (e_name, e_value) in self.enumerators:
+        for e_name, e_value in self.enumerators:
             if v & e_value != 0:
                 flag_list.append(e_name)
                 v = v & ~e_value
index 585fee3f183b0d289d33896522c36713bce03f9f..c58045e1866b24cd2244309dbff34020c12d45f1 100644 (file)
@@ -15,6 +15,7 @@
 
 import gdb
 
+
 # Take a gdb.TargetConnection and return the connection number.
 def conn_num(c):
     return c.num
index 01c4eed4ce84a4238265669584a7bc4221ad85c1..df94a592f687ee799363e3bcfab4f4e260962165 100644 (file)
@@ -33,7 +33,6 @@ class BackTrace(perftest.TestCaseWithBasicMeasurements):
             gdb.execute(do_test_command, False, True)
 
     def execute_test(self):
-
         line_size = 2
         for _ in range(1, 12):
             # Keep the total size of dcache unchanged, and increase the
index a385abca69fd587b146a28caa13b875b7f0f12b0..f7702a2cf4823f73af6ff323baa5e1ead59a0734 100644 (file)
@@ -18,6 +18,7 @@ import itertools
 from gdb.FrameDecorator import FrameDecorator
 import copy
 
+
 # A FrameDecorator that just returns gdb.Frame.pc () from 'function'.
 # We want to ensure that GDB correctly handles this case.
 class Function_Returns_Address(FrameDecorator):
index b7c18d3e4c79962f38ce24e021f3128b08f87185..c82b88b56cff611f6d9dc0ea209bff829c677b20 100644 (file)
@@ -139,6 +139,7 @@ class FrameElider:
 # thrown.
 name_error = RuntimeError
 
+
 # A simple decorator that gives an error when computing the function.
 class ErrorInName(FrameDecorator):
     def __init__(self, frame):
index dbdf160dc6c2bbd2e8fa2e809639186e6beaff83..c26a546943d3ea628b86b0d7ad485ec6d907f011 100644 (file)
@@ -21,6 +21,7 @@ import re
 # object sent to us in the new_inferior event.
 inf = None
 
+
 # Register the new_inferior event handler.
 def new_inferior_handler(event):
     global inf
@@ -33,6 +34,7 @@ gdb.events.new_inferior.connect(new_inferior_handler)
 # originating from this script.
 filters = [tracemalloc.Filter(True, "*py-inferior-leak.py")]
 
+
 # Add a new inferior, and return the number of the new inferior.
 def add_inferior():
     output = gdb.execute("add-inferior", False, True)
index 20d31dc6dbf893f9401b101e149fcee244dc08b6..7dc02d84d9adafd3516c1dcfb99e4afa3d57498c 100644 (file)
@@ -89,6 +89,7 @@ class ArrayPrinter(object):
 # Flag to make NoStringContainerPrinter throw an exception.
 exception_flag = False
 
+
 # Test a printer where to_string is None
 class NoStringContainerPrinter(object):
     def __init__(self, val):
index 96d1badf6648fe19f7cb8a436b78aab003a58164..d73949310bcf0f745fada0fd73791cfc36cf88b0 100644 (file)
@@ -30,7 +30,6 @@ from gdb.unwinder import Unwinder
 
 
 class TestUnwinder(Unwinder):
-
     count = 0
 
     @classmethod
@@ -52,7 +51,6 @@ class TestUnwinder(Unwinder):
         self.recurse_level = 0
 
     def __call__(self, pending_frame):
-
         if self.recurse_level > 0:
             gdb.write("TestUnwinder: Recursion detected - returning early.\n")
             return None
@@ -61,19 +59,16 @@ class TestUnwinder(Unwinder):
         TestUnwinder.inc_count()
 
         if TestUnwinder.test == "check_user_reg_pc":
-
             pc = pending_frame.read_register("pc")
             pc_as_int = int(pc.cast(gdb.lookup_type("int")))
             # gdb.write("In unwinder: pc=%x\n" % pc_as_int)
 
         elif TestUnwinder.test == "check_pae_pc":
-
             pc = gdb.parse_and_eval("$pc")
             pc_as_int = int(pc.cast(gdb.lookup_type("int")))
             # gdb.write("In unwinder: pc=%x\n" % pc_as_int)
 
         elif TestUnwinder.test == "check_undefined_symbol":
-
             try:
                 val = gdb.parse_and_eval("undefined_symbol")
 
index 08e2f1e7bef0fead82b8d66183523b2ae014ee5d..fd42f8b786a9a746f7619294c0942dc0904bbe24 100644 (file)
@@ -16,6 +16,7 @@
 import xml.etree.ElementTree as ET
 import gdb
 
+
 # Make use of gdb.RemoteTargetConnection.send_packet to fetch the
 # thread list from the remote target.
 #
index 3d9ada56b5a2d86cf0ee8bfdd3439a38a29b6284..401cb5197ff11ae68d2f5706471452583d07bdf8 100644 (file)
@@ -42,6 +42,7 @@ class TestWindow:
 
 gdb.register_window_type("test", TestWindow)
 
+
 # Call REMOVE_TITLE on the global window object.
 def delete_window_title():
     the_window.remove_title()