Skip to content

Commit ee06c79

Browse files
committed
gdb, testsuite, python: Add missing imports.
Removing the pretty printer (bound_registers.py) in the next commit leads to failures due to a missing import of 'gdb.printing': "AttributeError: module 'gdb' has no attribute 'printing'". Add this import to each file requiring it, as it's not imported by the pretty-printer anymore. Approved-By: Andrew Burgess <[email protected]>
1 parent 4eb048d commit ee06c79

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

gdb/python/lib/gdb/dap/varref.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from contextlib import contextmanager
1919

2020
import gdb
21+
import gdb.printing
2122

2223
from .server import client_bool_capability
2324
from .startup import DAPException, in_gdb_thread

gdb/testsuite/gdb.python/py-pp-cast.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# You should have received a copy of the GNU General Public License
1414
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

16+
import gdb.printing
1617

1718
class PpIntPrinter(object):
1819
def __init__(self, val):

gdb/testsuite/gdb.python/py-pp-re-notag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from time import asctime, gmtime
1717

1818
import gdb # silence pyflakes
19-
19+
import gdb.printing
2020

2121
class TimePrinter:
2222
def __init__(self, val):

gdb/testsuite/gdb.python/py-prettyprint-stub.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# This file is part of the GDB testsuite.
1717
# It tests Python-based pretty-printing of stubs.
1818

19+
import gdb.printing
1920

2021
class SPrinter:
2122
def __init__(self, val):

0 commit comments

Comments
 (0)