aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-pp-maint.py
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-04-28 22:14:23 -0700
committerDoug Evans <dje@google.com>2015-04-28 22:14:23 -0700
commit34f5f757b389e8fb3eab64f816e484c2cc434292 (patch)
treed03a9187ae43e7827e184dff9afd6d4de63c3b88 /gdb/testsuite/gdb.python/py-pp-maint.py
parent69b4374a87e5029ac4831c7a4471815514df662f (diff)
downloadbinutils-34f5f757b389e8fb3eab64f816e484c2cc434292.zip
binutils-34f5f757b389e8fb3eab64f816e484c2cc434292.tar.gz
binutils-34f5f757b389e8fb3eab64f816e484c2cc434292.tar.bz2
PR python/18299
gdb/ChangeLog: PR python/18299 * python/lib/gdb/printing.py (register_pretty_printer): Handle name or __name__ attributes. Handle gdb module as first argument. gdb/testsuite/ChangeLog: * gdb.python/py-pp-maint.py: Move "replace" testing to ... * gdb.python/py-pp-registration.exp: ... here. New file. * gdb.python/py-pp-registration.c: New file. * gdb.python/py-pp-registration.py: New file.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-pp-maint.py')
-rw-r--r--gdb/testsuite/gdb.python/py-pp-maint.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/gdb/testsuite/gdb.python/py-pp-maint.py b/gdb/testsuite/gdb.python/py-pp-maint.py
index 797f975..f4e5ecf 100644
--- a/gdb/testsuite/gdb.python/py-pp-maint.py
+++ b/gdb/testsuite/gdb.python/py-pp-maint.py
@@ -76,14 +76,3 @@ def build_pretty_printer():
gdb.printing.register_pretty_printer(gdb, lookup_function_lookup_test)
my_pretty_printer = build_pretty_printer()
gdb.printing.register_pretty_printer(gdb, my_pretty_printer)
-
-# Exercise the "replace" argument to register pretty_printer.
-saw_runtime_error = False
-try:
- gdb.printing.register_pretty_printer(gdb, my_pretty_printer, replace=False)
-except RuntimeError:
- saw_runtime_error = True
- pass
-if not saw_runtime_error:
- raise RuntimeError("Missing RuntimeError from register_pretty_printer")
-gdb.printing.register_pretty_printer(gdb, my_pretty_printer, replace=True)