]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Run isort
authorTom Tromey <tromey@adacore.com>
Wed, 20 Mar 2024 15:03:04 +0000 (09:03 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 2 Apr 2024 17:21:39 +0000 (11:21 -0600)
This patch is the result of running 'isort .' in the gdb directory.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
74 files changed:
gdb/python/lib/gdb/__init__.py
gdb/python/lib/gdb/command/frame_filters.py
gdb/python/lib/gdb/command/missing_debug.py
gdb/python/lib/gdb/command/pretty_printers.py
gdb/python/lib/gdb/command/type_printers.py
gdb/python/lib/gdb/command/unwinders.py
gdb/python/lib/gdb/command/xmethods.py
gdb/python/lib/gdb/dap/breakpoint.py
gdb/python/lib/gdb/dap/bt.py
gdb/python/lib/gdb/dap/disassemble.py
gdb/python/lib/gdb/dap/evaluate.py
gdb/python/lib/gdb/dap/events.py
gdb/python/lib/gdb/dap/frames.py
gdb/python/lib/gdb/dap/io.py
gdb/python/lib/gdb/dap/launch.py
gdb/python/lib/gdb/dap/locations.py
gdb/python/lib/gdb/dap/memory.py
gdb/python/lib/gdb/dap/scopes.py
gdb/python/lib/gdb/dap/server.py
gdb/python/lib/gdb/dap/sources.py
gdb/python/lib/gdb/dap/startup.py
gdb/python/lib/gdb/dap/state.py
gdb/python/lib/gdb/dap/varref.py
gdb/python/lib/gdb/disassembler.py
gdb/python/lib/gdb/frames.py
gdb/python/lib/gdb/function/caller_is.py
gdb/python/lib/gdb/function/strfns.py
gdb/python/lib/gdb/missing_debug.py
gdb/python/lib/gdb/printing.py
gdb/python/lib/gdb/prompt.py
gdb/python/lib/gdb/styling.py
gdb/python/lib/gdb/xmethod.py
gdb/python/python-config.py
gdb/syscalls/arm-linux.py
gdb/system-gdbinit/elinos.py
gdb/testsuite/analyze-racy-logs.py
gdb/testsuite/gdb.ada/pp-rec-component.py
gdb/testsuite/gdb.base/pc-not-saved.py
gdb/testsuite/gdb.dap/stack-format.py
gdb/testsuite/gdb.dap/type_check.py
gdb/testsuite/gdb.perf/gmonster-null-lookup.py
gdb/testsuite/gdb.perf/gmonster-pervasive-typedef.py
gdb/testsuite/gdb.perf/gmonster-print-cerr.py
gdb/testsuite/gdb.perf/gmonster-ptype-string.py
gdb/testsuite/gdb.perf/gmonster-runto-main.py
gdb/testsuite/gdb.perf/gmonster-select-file.py
gdb/testsuite/gdb.perf/lib/perftest/measure.py
gdb/testsuite/gdb.perf/lib/perftest/perftest.py
gdb/testsuite/gdb.perf/solib.py
gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.py
gdb/testsuite/gdb.python/py-bad-printers.py
gdb/testsuite/gdb.python/py-disasm.py
gdb/testsuite/gdb.python/py-event-load.py
gdb/testsuite/gdb.python/py-frame-args.py
gdb/testsuite/gdb.python/py-framefilter-addr.py
gdb/testsuite/gdb.python/py-framefilter-gdb.py
gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py
gdb/testsuite/gdb.python/py-framefilter-invalidarg.py
gdb/testsuite/gdb.python/py-framefilter.py
gdb/testsuite/gdb.python/py-inferior-leak.py
gdb/testsuite/gdb.python/py-mi-var-info-path-expression.py
gdb/testsuite/gdb.python/py-missing-debug.py
gdb/testsuite/gdb.python/py-nested-maps.py
gdb/testsuite/gdb.python/py-pp-integral.py
gdb/testsuite/gdb.python/py-pp-maint.py
gdb/testsuite/gdb.python/py-pp-re-notag.py
gdb/testsuite/gdb.python/py-pp-registration.py
gdb/testsuite/gdb.python/py-prettyprint.py
gdb/testsuite/gdb.python/py-send-packet.py
gdb/testsuite/gdb.python/py-unwind-maint.py
gdb/testsuite/gdb.python/py-unwind.py
gdb/testsuite/gdb.python/py-xmethods.py
gdb/testsuite/gdb.rust/pp.py
gdb/testsuite/print-ts.py

index 9db91d8261b65a8ebc22ba9762355a8e6b1a54b1..6c3e2419a40119e1f0c2a9495da9ace4b771c46f 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os
 import signal
+import sys
 import threading
 import traceback
-import os
-import sys
 from contextlib import contextmanager
 
 # Python 3 moved "reload"
index d774e194fba31f5dbc5f0427224c1c814e854057..4e1b3208d0ef705ab0c43cb5628655a1d2836695 100644 (file)
@@ -17,6 +17,7 @@
 """GDB commands for working with frame-filters."""
 
 import sys
+
 import gdb
 import gdb.frames
 
index 9a55e1822f5a7582f2d5969d100530121674b876..313b88cf8c31c0ba34317d7d6acf74bfc85c0c44 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
 import re
 
+import gdb
+
 
 def validate_regexp(exp, idstring):
     """Compile exp into a compiler regular expression object.
index 6a938ed8fcd5d8a46b130ca1c067dff612aed9ea..cb9b9f35f9f35800df5c44a69e7e033c95777e93 100644 (file)
 """GDB commands for working with pretty-printers."""
 
 import copy
-import gdb
 import re
 
+import gdb
+
 
 def parse_printer_regexps(arg):
     """Internal utility to parse a pretty-printer command argv.
index 339f5aac6a2eaa1f90109b6785f0da180c4c4d3d..a2be226850d6a777d8aae3454e87df05ba04b39b 100644 (file)
@@ -15,6 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import copy
+
 import gdb
 
 """GDB commands for working with type-printers."""
index 886287f8794667a6a39601bc845a2a56da95c3d0..b863b333aa0e574e5e1091a11995e7eb402fa712 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
 import re
 
+import gdb
+
 
 def validate_regexp(exp, idstring):
     try:
index fe310b7787ee53ba947df19117b4887af5339aa9..f78622718585f10b3154fef37a2de3cd17d67ba6 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
 import re
 
+import gdb
+
 """GDB commands for working with xmethods."""
 
 
index b4fb1127c2d753fc177d55ab3cd83ac6c9f47501..b2e74277ebded882d23250410463c683af144584 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
 import os
 import re
-
 from contextlib import contextmanager
 
 # These are deprecated in 3.9, but required in older versions.
 from typing import Optional, Sequence
 
-from .server import request, capability, send_event
+import gdb
+
+from .server import capability, request, send_event
 from .sources import make_source
-from .startup import in_gdb_thread, log_stack, parse_and_eval, LogLevel, DAPException
+from .startup import DAPException, LogLevel, in_gdb_thread, log_stack, parse_and_eval
 from .typecheck import type_check
 
-
 # True when suppressing new breakpoint events.
 _suppress_bp = False
 
index d65ce5fcc2a73d168bb81f3b95a817d82be8886b..e0c2e2a1751d6e8e05e2ab13af15d72d2a4630c7 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
 import os
 
 # This is deprecated in 3.9, but required in older versions.
 from typing import Optional
 
+import gdb
+
 from .frames import dap_frame_generator
 from .modules import module_id
 from .scopes import symbol_value
-from .server import request, capability
+from .server import capability, request
 from .sources import make_source
 from .startup import in_gdb_thread
 from .state import set_thread
index a782528989922eb35da6329baa19a65e491e7633..65bf3d4457b0d093c1e92331372db46427b4e8b7 100644 (file)
@@ -15,7 +15,7 @@
 
 import gdb
 
-from .server import request, capability
+from .server import capability, request
 
 
 @request("disassemble")
index 62519a55521290849d9e31400abd45c0e56a55c3..34843f423d8394a66a46738c68077d373a1133c5 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
-
 # This is deprecated in 3.9, but required in older versions.
 from typing import Optional
 
+import gdb
+
 from .frames import select_frame
-from .server import capability, request, client_bool_capability
-from .startup import in_gdb_thread, parse_and_eval, DAPException
-from .varref import find_variable, VariableReference, apply_format
+from .server import capability, client_bool_capability, request
+from .startup import DAPException, in_gdb_thread, parse_and_eval
+from .varref import VariableReference, apply_format, find_variable
 
 
 class EvaluateResult(VariableReference):
index 928f23fd3ff9bc707b57eebd8774ec8bdc2b1f87..276d3145b9aa2ed0e1f7cbae6ba8f1e64df27c9b 100644 (file)
 
 import gdb
 
+from .modules import is_module, make_module
 from .scopes import set_finish_value
 from .server import send_event
 from .startup import exec_and_log, in_gdb_thread, log
-from .modules import is_module, make_module
-
 
 # True when the inferior is thought to be running, False otherwise.
 # This may be accessed from any thread, which can be racy.  However,
index 161c84b025bb28299d7b00167d2fb53e68c669f2..07a4e3ea793d22e26eb19f008e14589fd7602e47 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
 import itertools
 
+import gdb
 from gdb.frames import frame_iterator
 
 from .startup import in_gdb_thread
 
-
 # A list of all the frames we've reported.  A frame's index in the
 # list is its ID.  We don't use a hash here because frames are not
 # hashable.
index bbf822d60bfd20ca35565b5799b780b235e0ccdc..03031a72393e7284094d5561c496a9ee04afc819 100644 (file)
@@ -15,7 +15,7 @@
 
 import json
 
-from .startup import start_thread, log, log_stack, LogLevel
+from .startup import LogLevel, log, log_stack, start_thread
 
 
 def read_json(stream):
index 6783d999621b25c96fd73d8bb2a545f390d2dd55..2674e02eac3f9f4fe51e3631f596f3a0401b94d3 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
-
 # These are deprecated in 3.9, but required in older versions.
 from typing import Mapping, Optional, Sequence
 
+import gdb
+
 from .events import exec_and_expect_stop, expect_process, expect_stop
-from .server import request, capability
-from .startup import exec_and_log, DAPException
+from .server import capability, request
+from .startup import DAPException, exec_and_log
 
 
 # Any parameters here are necessarily extensions -- DAP requires this
index 098091b4b425c467c13e6f32e28aeeadddba8365..92e68f5e23593e7f12e6c8667d5f94e21aadcb67 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
-
 # This is deprecated in 3.9, but required in older versions.
 from typing import Optional
 
+import gdb
+
 from .server import capability, request
 from .sources import decode_source
 
index 19a61d634998026c6309ba5af16290965effada3..dd62b0e7ba6937c67cb99742b4e50e0de5a47ab5 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import base64
+
 import gdb
 
-from .server import request, capability
+from .server import capability, request
 
 
 @request("readMemory")
index be2c382b40b707d3997edd359ecff3e171c98338..8cd860141d619b704dbada42b59b79fe0404c4a3 100644 (file)
 import gdb
 
 from .frames import frame_for_id
-from .startup import in_gdb_thread
 from .server import request
+from .startup import in_gdb_thread
 from .varref import BaseReference
 
-
 # Map DAP frame IDs to scopes.  This ensures that scopes are re-used.
 frame_to_scope = {}
 
index 70646f4d75c5c7192c8be5c64bc7adcdaee4df1e..7eb87177710bbb3284fe3d529e280c36196c7097 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import functools
-import gdb
 import heapq
 import inspect
 import json
 import threading
 from contextlib import contextmanager
 
-from .io import start_json_writer, read_json
+import gdb
+
+from .io import read_json, start_json_writer
 from .startup import (
-    exec_and_log,
     DAPException,
     DAPQueue,
+    LogLevel,
+    exec_and_log,
     in_dap_thread,
     in_gdb_thread,
-    start_thread,
     log,
     log_stack,
-    LogLevel,
+    start_thread,
     thread_log,
 )
 from .typecheck import type_check
 
-
 # Map capability names to values.
 _capabilities = {}
 
index c9b77208145731d1a14153ea99a465974617cff0..ee3464db6795ddf688118dabf3091152ff3dc368 100644 (file)
@@ -17,9 +17,8 @@ import os
 
 import gdb
 
-from .server import request, capability
-from .startup import in_gdb_thread, DAPException
-
+from .server import capability, request
+from .startup import DAPException, in_gdb_thread
 
 # The next available source reference ID.  Must be greater than 0.
 _next_source = 1
index aaf1e8cd65751a01190010c81e7960edc750544f..58591c00b97ddaf8626a95de3f16d6cdbeef16e2 100644 (file)
 # Do not import other gdbdap modules here -- this module must come
 # first.
 import functools
-import gdb
 import queue
+import sys
 import threading
 import traceback
-import sys
-
 from enum import IntEnum, auto
 
+import gdb
+
 # Adapt to different Queue types.  This is exported for use in other
 # modules as well.
 if sys.version_info[0] == 3 and sys.version_info[1] <= 6:
index 9cb703157de215a9dbcc4b07457356364d5f9c90..57ae355f45ed45d9e3044f6a9b7e008b247a8670 100644 (file)
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from .startup import in_gdb_thread, exec_and_log, log
+from .startup import exec_and_log, in_gdb_thread, log
 
 
 @in_gdb_thread
index e413e4e8043132cae0dac01ff4c1038ded1709c6..57e84a1676e2a39c1a99ea29541de4a9b2996b88 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
-from .startup import in_gdb_thread, DAPException
-from .server import client_bool_capability
 from abc import ABC, abstractmethod
 from collections import defaultdict
 from contextlib import contextmanager
 
+import gdb
+
+from .server import client_bool_capability
+from .startup import DAPException, in_gdb_thread
 
 # A list of all the variable references created during this pause.
 all_variables = []
index af7dcc5f6a861395d35f02ba52ec6a081a661c58..72d311b117f20dd995a2c5181eccacd66ad9abdd 100644 (file)
@@ -15,7 +15,6 @@
 
 """Disassembler related module."""
 
-import gdb
 import _gdb.disassembler
 
 # Re-export everything from the _gdb.disassembler module, which is
@@ -23,6 +22,8 @@ import _gdb.disassembler
 # here to silence flake8.
 from _gdb.disassembler import *  # noqa: F401,F403
 
+import gdb
+
 # Module global dictionary of gdb.disassembler.Disassembler objects.
 # The keys of this dictionary are bfd architecture names, or the
 # special value None.
index 44f3217b8f8001644262ebc56730aeb0cf48f025..a3be80c72a0565df33b6253a86484d5a77fc4446 100644 (file)
 
 """Internal functions for working with frame-filters."""
 
+import collections
+import itertools
+
 import gdb
+from gdb.FrameDecorator import DAPFrameDecorator, FrameDecorator
 from gdb.FrameIterator import FrameIterator
-from gdb.FrameDecorator import FrameDecorator, DAPFrameDecorator
-import itertools
-import collections
 
 
 def get_priority(filter_item):
index eb87c23740b634c44d466d899c41458889529c05..bacd8c0ef8b33bf5c3ef3936e77f854ef3bdf296 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
 import re
 
+import gdb
+
 
 class CallerIs(gdb.Function):
     """Check the calling function's name.
index 42e5b9cd35b1c574ca18b0d7b34cd22bc0260789..90c9ceab8679dbd95b4c87c2630dac753055bf7a 100644 (file)
 
 """$_memeq, $_strlen, $_streq, $_regex"""
 
-import gdb
 import re
 
+import gdb
+
 
 class _MemEq(gdb.Function):
     """$_memeq - compare bytes of memory.
index 3093a9ffe4c488bcc00bfa324f3b01cb2fc67c21..6d57462c185bdd96727876bb1c2e5036c5d3f46c 100644 (file)
 MissingDebugHandler base class, and register_handler function.
 """
 
-import gdb
 import sys
 
+import gdb
+
 if sys.version_info >= (3, 7):
     # Functions str.isascii() and str.isalnum are available starting Python
     # 3.7.
@@ -32,7 +33,7 @@ if sys.version_info >= (3, 7):
 else:
     # Fall back to curses.ascii.isascii() and curses.ascii.isalnum() for
     # earlier versions.
-    from curses.ascii import isascii, isalnum
+    from curses.ascii import isalnum, isascii
 
 
 def _validate_name(name):
index d7933e9df7636f66ff2f77761c79bcd5ad2c6500..55ba43585eca13809385e559ad27ee441d653498 100644 (file)
 
 """Utilities for working with pretty-printers."""
 
-import gdb
-import gdb.types
 import itertools
 import re
 
+import gdb
+import gdb.types
+
 
 class PrettyPrinter(object):
     """A basic pretty-printer.
index 02185b353df24ea9e54fdcdb8a901e88ad76888d..4ad38e4567aa5cac71f1a4939a763fa995d8a126 100644 (file)
 
 """ Extended prompt library functions."""
 
-import gdb
 import os
 
+import gdb
+
 
 def _prompt_pwd(ignore):
     "The current working directory."
index 8e5d64f15d9a8e00de833903782cec87fc383ed2..1c5394e479b1d2d573206a272ca0c3233a0c8c09 100644 (file)
@@ -19,9 +19,9 @@
 import gdb
 
 try:
-    from pygments import formatters, lexers, highlight
-    from pygments.token import Error, Comment, Text
+    from pygments import formatters, highlight, lexers
     from pygments.filters import TokenMergeFilter
+    from pygments.token import Comment, Error, Text
 
     _formatter = None
 
index ea7b15c4dac4bf2964a5b5d93a23f08e0a1d3d63..c98402d271f590935daea2e79189551418ad34e0 100644 (file)
 
 """Utilities for defining xmethods"""
 
-import gdb
 import re
 
+import gdb
+
 
 class XMethod(object):
     """Base class (or a template) for an xmethod description.
index e89e0fd40bb01731c63033664d814ba92c125e42..061eae1ac644f6d8afdf72ba6889f391e3a832c3 100644 (file)
@@ -1,9 +1,9 @@
 # Program to fetch python compilation parameters.
 # Copied from python-config of the 2.7 release.
 
-import sys
-import os
 import getopt
+import os
+import sys
 import sysconfig
 
 valid_opts = ["prefix", "exec-prefix", "includes", "libs", "cflags", "ldflags", "help"]
index 8213f5ce33d0fe6d2f236fc758b6dcca977917e9..a3f64d0a8254bbc1a5be86f81eed7757240adc84 100644 (file)
@@ -5,8 +5,8 @@
 # notice and this notice are preserved.  This file is offered as-is,
 # without any warranty.
 
-import sys
 import re
+import sys
 import time
 
 infname = sys.argv[1]
index bd9d46304388d8f2cc7f5f5cc5f6aa8223d80b25..da82687a76f29aec45ab6df9326be08aacee95dc 100644 (file)
@@ -15,8 +15,9 @@
 
 """Configure GDB using the ELinOS environment."""
 
-import os
 import glob
+import os
+
 import gdb
 
 
index bd548e23a312aebd1df4583481df24381f0a2b20..152490e7686b91a82f9f75f5fe83dab7148c00c7 100755 (executable)
@@ -29,9 +29,9 @@
 # This program is invoked when the user runs "make check" and
 # specifies the RACY_ITER environment variable.
 
-import sys
 import os
 import re
+import sys
 
 # The (global) dictionary that stores the associations between a *.sum
 # file and its results.  The data inside it will be stored as:
index 339e4a362a3f590d1bd867d3180b35963284d15f..3d398125e06f0197348038768bbecd099998917d 100644 (file)
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from time import asctime, gmtime
+
 import gdb  # silence pyflakes
 
 
index 2e19da80b3f1a8af9fff17629942337249f5da11..8090858895e91b603724fb62f0ac711579c83b41 100644 (file)
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import gdb
-from gdb.unwinder import Unwinder, FrameId
+from gdb.unwinder import FrameId, Unwinder
 
 # Cached FrameId.  See set_break_bt_here_frame_id for details.
 break_bt_here_frame_id = None
index 12c6cc473e5ed75b189e07f6401e7f9ad0806ff9..b7799f41dac9ffcf4ce99514d5d8916c1570bef5 100644 (file)
@@ -14,9 +14,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-import gdb
 import itertools
 
+import gdb
 from gdb.FrameDecorator import DAPFrameDecorator
 
 
index 513995b5571403638a256931732d4291738848ad..81b106a595f49110a7d00576ec2bfe7243e571e9 100644 (file)
@@ -16,6 +16,7 @@
 # Test the type checker.
 
 import typing
+
 from gdb.dap.typecheck import type_check
 
 
index b6cbcf3e825a92a856c113782b3b66353001ae11..0d5ba7688435537c04e382538facdbcc97862565 100644 (file)
@@ -17,9 +17,7 @@
 # Efficient handling of this case is important, and not just for typos.
 # Sometimes the debug info for the needed object isn't present.
 
-from perftest import perftest
-from perftest import measure
-from perftest import utils
+from perftest import measure, perftest, utils
 
 
 class NullLookup(perftest.TestCaseWithBasicMeasurements):
index 048cf7af2d0c7f9128bfd8495cdafa947fd41d86..3e239f5292b592b855312e51a896105122f456b5 100644 (file)
@@ -17,9 +17,7 @@
 # typedef used pervasively.  This exercises the perf regression introduced by
 # the original patch to pr 16253.
 
-from perftest import perftest
-from perftest import measure
-from perftest import utils
+from perftest import measure, perftest, utils
 
 
 class PervasiveTypedef(perftest.TestCaseWithBasicMeasurements):
index 97f454b25fbb42de37239f44296d1b524df47cca..4f57b860bddbc3423c6b66366be7b877f3f50723 100644 (file)
@@ -25,9 +25,7 @@
 # is that here we do not pre-expand the symtab: we don't want include
 # GDB's slowness in searching expanded symtabs first to color these results.
 
-from perftest import perftest
-from perftest import measure
-from perftest import utils
+from perftest import measure, perftest, utils
 
 
 class PrintCerr(perftest.TestCaseWithBasicMeasurements):
index 7ecc221378a15c3af64e9e4a9adfc3f8ff38cc36..0c000ef5bb3ffc2f46289dbfa1ed7098607f0fac 100644 (file)
@@ -19,9 +19,7 @@
 # these before it searches the index (there is work-in-progress to fix this),
 # this test helps measure the issue.
 
-from perftest import perftest
-from perftest import measure
-from perftest import utils
+from perftest import measure, perftest, utils
 
 
 class GmonsterPtypeString(perftest.TestCaseWithBasicMeasurements):
index e69036763a6c74b8577494eace430c91839f23d4..a183d68d0121b8530d8adac6c4719691c2fa5987 100644 (file)
@@ -15,9 +15,7 @@
 
 # Measure performance of running to main.
 
-from perftest import perftest
-from perftest import measure
-from perftest import utils
+from perftest import measure, perftest, utils
 
 
 class GmonsterRuntoMain(perftest.TestCaseWithBasicMeasurements):
index 211211236fb4c993fa8dd24085e5e32b2b5eaa12..4708458384eaf1a1d4ba252c09e262883289ed38 100644 (file)
@@ -15,9 +15,7 @@
 
 # Measure performance of selecting a file to debug.
 
-from perftest import perftest
-from perftest import measure
-from perftest import utils
+from perftest import measure, perftest, utils
 
 
 class GmonsterSelectFile(perftest.TestCaseWithBasicMeasurements):
index 942b1c4774d565266d47f6b540d02961cead96e7..00a1a9ada2bc4dcfc2a99aa981b7b9209f30e729 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import time
-import os
 import gc
+import os
 import sys
+import time
 
 # time.perf_counter() and time.process_time() were added in Python
 # 3.3, time.clock() was removed in Python 3.8.
index caaae13c5b65164cf2599b9803178d14b644f342..40ed9cc0d6897ebb6593090191faf7e5c28c9808 100644 (file)
 
 from __future__ import absolute_import
 
-import perftest.testresult as testresult
 import perftest.reporter as reporter
-from perftest.measure import Measure
-from perftest.measure import MeasurementPerfCounter
-from perftest.measure import MeasurementProcessTime
-from perftest.measure import MeasurementWallTime
-from perftest.measure import MeasurementVmSize
+import perftest.testresult as testresult
+from perftest.measure import (
+    Measure,
+    MeasurementPerfCounter,
+    MeasurementProcessTime,
+    MeasurementVmSize,
+    MeasurementWallTime,
+)
 
 
 class TestCase(object):
index 0dd1d7429becdb9e905f0733c6142869dba2a067..470009667e8de9e6b00f687c8ed2253b86b85fbf 100644 (file)
@@ -16,8 +16,7 @@
 # This test case is to test the speed of GDB when it is handling the
 # shared libraries of inferior are loaded and unloaded.
 
-from perftest import perftest
-from perftest import measure
+from perftest import measure, perftest
 
 
 class SolibLoadUnload1(perftest.TestCaseWithBasicMeasurements):
index 97dc3758079dee3ff20c8a015e3019713644df7c..d63c087719980b63add52797982242d542055ac1 100644 (file)
 # registered when a custom event handler for the new_objfile event
 # is called.
 
-import gdb
 import os
 
+import gdb
+
 
 def new_objfile_handler(event):
     assert isinstance(event, gdb.NewObjFileEvent)
index 068c00140a31bfc96a9fbf6bec2c675b3d307428..ac9c35e6a901d77ccad9a9601cf0c823a70ed136 100644 (file)
@@ -19,6 +19,7 @@
 # Test a printer with a bad children iterator.
 
 import re
+
 import gdb.printing
 
 
index 281ce6b8c2a3a3535825e25affa0df4b45e59a69..c09eae811ee35326f4c162e95835333f2040b66b 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
-import gdb.disassembler
 import struct
 import sys
 
+import gdb
+import gdb.disassembler
 from gdb.disassembler import Disassembler, DisassemblerResult
 
 # A global, holds the program-counter address at which we should
index 0c9e736a0bbfa67e728d7b1f457dd780b41ae59c..cffd5c0a15dca097decc161c2e4a55b9fa4304cb 100644 (file)
@@ -17,7 +17,6 @@
 
 import gdb
 
-
 freed_objfile = None
 
 
index abf89ac20f9c96b12fb6a09b25d2285e94221577..04ab1ac46724dd147058df78939b3f58f67be42a 100644 (file)
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import re
+
 import gdb
 
 
index 7c64440b59c3eb6ee74d198abe02a004be464ac9..c22d91c10ba3919a96fd99d86dae6238b1d46f36 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import gdb
+import copy
 import itertools
+
+import gdb
 from gdb.FrameDecorator import FrameDecorator
-import copy
 
 
 # A FrameDecorator that just returns gdb.Frame.pc () from 'function'.
index 2b786913243151da7ec999d2d57f06d98db31ee7..ada7ad72e4ccdde1e9d55fbc9c4efa0069c2a763 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import itertools
+
 # This file is part of the GDB testsuite.  It tests Python-based
 # frame-filters.
 import gdb
-import itertools
 from gdb.FrameDecorator import FrameDecorator
 
 
index 60e81fc2f88aab4753505933c02b03fbf219c23d..fbe0c0d4a949642ebddd226f7074a38e7f675aba 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import itertools
+
 # This file is part of the GDB testsuite.  It tests Python-based
 # frame-filters.
 import gdb
-import itertools
 from gdb.FrameDecorator import FrameDecorator
 
 
index 0793a2875d82731f7b85d08075146f87beab1dbe..cb25cd9902c735bbfa7c6520539cc9de9942ce54 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import copy
+import itertools
+
 # This file is part of the GDB testsuite.  It tests Python-based
 # frame-filters.
 import gdb
-import itertools
 from gdb.FrameDecorator import FrameDecorator
-import copy
 
 
 class Reverse_Function(FrameDecorator):
index 720fbf920d0d63677842d84cd8ffd10cf2ce9a48..fb679f18b4f22b3be1df3454d774908b8eabf078 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import copy
+import itertools
+
 # This file is part of the GDB testsuite.  It tests Python-based
 # frame-filters.
 import gdb
-import itertools
 from gdb.FrameDecorator import FrameDecorator
-import copy
 
 
 class Reverse_Function(FrameDecorator):
index c3e88015e9908656217e81188004cd6b7b9893d5..ae3629a76a0c7aa169845313ef0ec686875cceb4 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import re
 import tracemalloc
+
 import gdb
-import re
 
 # A global variable in which we store a reference to the gdb.Inferior
 # object sent to us in the new_inferior event.
index 21843e0d7ab23b7b4931b4e7a3257bf828783e3f..889188fb403a089f7bcd5cc425e195190e6cff86 100644 (file)
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import sys
+
 import gdb
 import gdb.types
 
index 502180336abd1b84f0fdc1b55b49ad26dd636665..c1bafdd6c26a26154ff60b49c6f9359747280977 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os
+from enum import Enum
+
 import gdb
 from gdb.missing_debug import MissingDebugHandler
-from enum import Enum
-import os
 
 # A global log that is filled in by instances of the LOG_HANDLER class
 # when they are called.
index e949941df82892e5e766eef4a4f48156150657c7..ac04bbff5974ed2ca9e4e55814ab51aca5c3cfc0 100644 (file)
@@ -17,6 +17,7 @@
 # nested map like structures.
 
 import re
+
 import gdb
 
 
index 4c981d62564822568e6adb0cb309d87c00e3a5c9..089ca5ba69b1a1cf9b2e1de2a9312f60c92d350c 100644 (file)
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from time import asctime, gmtime
+
 import gdb  # silence pyflakes
 
 
index 598c5441cb8f150a28131c5232f1b57ad36e586d..91c193fb8ca0caf0859368385da5903663e57f2f 100644 (file)
@@ -17,8 +17,9 @@
 # printers.
 
 import re
-import gdb.types
+
 import gdb.printing
+import gdb.types
 
 
 def lookup_function_lookup_test(val):
index 9cc889f819f3dd938be11eb742d0cd6fa86b6c1b..6aefad13d853014661339727748cd8c1b77fcae0 100644 (file)
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from time import asctime, gmtime
+
 import gdb  # silence pyflakes
 
 
index c87f75dc56f34f8eeddacc09875c111e36f1cbb9..1b7eff8ceba562105dbbcd1b27d4fba189c8ed97 100644 (file)
@@ -17,8 +17,9 @@
 # printer registration.
 
 import re
-import gdb.types
+
 import gdb.printing
+import gdb.types
 
 
 def lookup_function_lookup_test(val):
index 79c06dd774ff1a162b6b3536bf8c4d2d6fe95e3c..e4ac3e1e510a10d658445ec7a485dd0e2d3c47c4 100644 (file)
@@ -17,6 +17,7 @@
 # printers.
 
 import re
+
 import gdb
 
 
index 93b0a79f3c510ea0edd3d73878ff8feb5af934a5..402b0397bc7bd91e23eac892227e8750d19b1fb1 100644 (file)
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import xml.etree.ElementTree as ET
+
 import gdb
 
 
index f87263d85fe7f5537a6bb1d9c84a54f4ab8391f1..1d049a999f486369870aa167fd3a7cf4db71fa47 100644 (file)
@@ -16,6 +16,7 @@
 # This file is part of the GDB testsuite.  It tests python unwinders.
 
 import re
+
 import gdb.types
 from gdb.unwinder import Unwinder, register_unwinder
 
index 6073e585169a0d56b8febfa0ea26755122cfa763..62bfb09f443273a9a8029f990c5e0be5f4b780f9 100644 (file)
@@ -14,8 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import gdb
-from gdb.unwinder import Unwinder, FrameId
-
+from gdb.unwinder import FrameId, Unwinder
 
 # These are set to test whether invalid register names cause an error.
 add_saved_register_errors = {}
index 54bd10b1cbd90a4d588c3bb1ba5dfe326e95db10..a2b8d578c660d1dfe13b8dfd738ea98c1e01747a 100644 (file)
 # This file is part of the GDB testsuite.  It test the xmethods support
 # in the Python extension language.
 
-import gdb
 import re
 
-from gdb.xmethod import XMethod
-from gdb.xmethod import XMethodMatcher, XMethodWorker
-from gdb.xmethod import SimpleXMethodMatcher
+import gdb
+from gdb.xmethod import SimpleXMethodMatcher, XMethod, XMethodMatcher, XMethodWorker
 
 
 def A_plus_A(obj, opr):
index 356737bd794f140ec0fba1ad6a78ca344e8dae96..fbc0868f83a2922c10d66fb776b590a1d3f04aad 100644 (file)
@@ -17,6 +17,7 @@
 # printers.
 
 import re
+
 import gdb
 
 
index 086c293eeac389c554b9fbc5fbfd45b99c83e8f1..0a832ba7b93f5c409a9e2ac5086c77ed3e60b3f9 100755 (executable)
 # FORMAT must be a string compatible with "strftime".  If nothing is
 # provided, we choose a reasonable format.
 
-import fileinput
 import datetime
-import sys
+import fileinput
 import os
+import sys
 
 if len(sys.argv) > 1:
     fmt = sys.argv[1]