aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-26 20:13:55 -0500
committerSimon Marchi <simon.marchi@efficios.com>2023-02-27 13:28:32 -0500
commit09de95fbb79c31b1b163a0c19bc1f0cd428c5d8c (patch)
treedf66d8b6c7bdd07070d49f3ed64819102bacf7af /gdb/testsuite
parentaa992b382f91f426cd51bf1375d78eacb509f2cc (diff)
downloadgdb-09de95fbb79c31b1b163a0c19bc1f0cd428c5d8c.zip
gdb-09de95fbb79c31b1b163a0c19bc1f0cd428c5d8c.tar.gz
gdb-09de95fbb79c31b1b163a0c19bc1f0cd428c5d8c.tar.bz2
gdb: reformat Python files with black 23.1.0
Change-Id: Ie8ec8870a16d71c5858f5d08958309d23c318302 Reviewed-By: Tom Tromey <tom@tromey.com> Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.multi/multi-target-info-inferiors.py1
-rw-r--r--gdb/testsuite/gdb.perf/backtrace.py1
-rw-r--r--gdb/testsuite/gdb.python/py-framefilter-addr.py1
-rw-r--r--gdb/testsuite/gdb.python/py-framefilter.py1
-rw-r--r--gdb/testsuite/gdb.python/py-inferior-leak.py2
-rw-r--r--gdb/testsuite/gdb.python/py-prettyprint.py1
-rw-r--r--gdb/testsuite/gdb.python/py-recurse-unwind.py5
-rw-r--r--gdb/testsuite/gdb.python/py-send-packet.py1
-rw-r--r--gdb/testsuite/gdb.python/tui-window.py1
9 files changed, 8 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.py b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.py
index 585fee3..c58045e 100644
--- a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.py
+++ b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.py
@@ -15,6 +15,7 @@
import gdb
+
# Take a gdb.TargetConnection and return the connection number.
def conn_num(c):
return c.num
diff --git a/gdb/testsuite/gdb.perf/backtrace.py b/gdb/testsuite/gdb.perf/backtrace.py
index 01c4eed..df94a59 100644
--- a/gdb/testsuite/gdb.perf/backtrace.py
+++ b/gdb/testsuite/gdb.perf/backtrace.py
@@ -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
diff --git a/gdb/testsuite/gdb.python/py-framefilter-addr.py b/gdb/testsuite/gdb.python/py-framefilter-addr.py
index a385abc..f7702a2 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-addr.py
+++ b/gdb/testsuite/gdb.python/py-framefilter-addr.py
@@ -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):
diff --git a/gdb/testsuite/gdb.python/py-framefilter.py b/gdb/testsuite/gdb.python/py-framefilter.py
index b7c18d3..c82b88b 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.py
+++ b/gdb/testsuite/gdb.python/py-framefilter.py
@@ -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):
diff --git a/gdb/testsuite/gdb.python/py-inferior-leak.py b/gdb/testsuite/gdb.python/py-inferior-leak.py
index dbdf160..c26a546 100644
--- a/gdb/testsuite/gdb.python/py-inferior-leak.py
+++ b/gdb/testsuite/gdb.python/py-inferior-leak.py
@@ -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)
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.py b/gdb/testsuite/gdb.python/py-prettyprint.py
index 20d31dc..7dc02d8 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.py
+++ b/gdb/testsuite/gdb.python/py-prettyprint.py
@@ -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):
diff --git a/gdb/testsuite/gdb.python/py-recurse-unwind.py b/gdb/testsuite/gdb.python/py-recurse-unwind.py
index 96d1bad..d739493 100644
--- a/gdb/testsuite/gdb.python/py-recurse-unwind.py
+++ b/gdb/testsuite/gdb.python/py-recurse-unwind.py
@@ -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")
diff --git a/gdb/testsuite/gdb.python/py-send-packet.py b/gdb/testsuite/gdb.python/py-send-packet.py
index 08e2f1e..fd42f8b 100644
--- a/gdb/testsuite/gdb.python/py-send-packet.py
+++ b/gdb/testsuite/gdb.python/py-send-packet.py
@@ -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.
#
diff --git a/gdb/testsuite/gdb.python/tui-window.py b/gdb/testsuite/gdb.python/tui-window.py
index 3d9ada5..401cb51 100644
--- a/gdb/testsuite/gdb.python/tui-window.py
+++ b/gdb/testsuite/gdb.python/tui-window.py
@@ -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()