aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorPedro Silva <pedromsilva.git@gmail.com>2024-11-11 08:07:07 +0000
committerSimon Marchi <simon.marchi@polymtl.ca>2024-11-11 08:49:13 -0500
commit272eacf34fd07101995615dac971f07546fa79dd (patch)
treec2b3c5c5e568813d9320ca7e7623d2d0ea3ab75a /gdb/python
parent023e60ced0c850aa32ac4a948877d25592d44401 (diff)
downloadgdb-272eacf34fd07101995615dac971f07546fa79dd.zip
gdb-272eacf34fd07101995615dac971f07546fa79dd.tar.gz
gdb-272eacf34fd07101995615dac971f07546fa79dd.tar.bz2
gdb: fix missing operator % on xmethod matcher output
Fixed missing operator % on xmethod matcher registration output and, as suggested on bug 32532, converted both uses of operator % to str.format. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32352 Change-Id: Ic471516292c2f1d6d1284aaeaea3ec14421decb8
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/lib/gdb/xmethod.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/python/lib/gdb/xmethod.py b/gdb/python/lib/gdb/xmethod.py
index c98402d..e12d51c 100644
--- a/gdb/python/lib/gdb/xmethod.py
+++ b/gdb/python/lib/gdb/xmethod.py
@@ -266,9 +266,14 @@ def register_xmethod_matcher(locus, matcher, replace=False):
del locus.xmethods[index]
else:
raise RuntimeError(
- "Xmethod matcher already registered with "
- "%s: %s" % (locus_name, matcher.name)
+ "Xmethod matcher already registered with {}: {}".format(
+ locus_name, matcher.name
+ )
)
if gdb.parameter("verbose"):
- gdb.write("Registering xmethod matcher '%s' with %s' ...\n")
+ gdb.write(
+ "Registering xmethod matcher '{}' with '{}' ...\n".format(
+ locus_name, matcher.name
+ )
+ )
locus.xmethods.insert(0, matcher)