forked from Imagelibrary/binutils-gdb
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
This commit is contained in:
committed by
Simon Marchi
parent
023e60ced0
commit
272eacf34f
@@ -266,9 +266,14 @@ def register_xmethod_matcher(locus, matcher, replace=False):
|
|||||||
del locus.xmethods[index]
|
del locus.xmethods[index]
|
||||||
else:
|
else:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"Xmethod matcher already registered with "
|
"Xmethod matcher already registered with {}: {}".format(
|
||||||
"%s: %s" % (locus_name, matcher.name)
|
locus_name, matcher.name
|
||||||
|
)
|
||||||
)
|
)
|
||||||
if gdb.parameter("verbose"):
|
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)
|
locus.xmethods.insert(0, matcher)
|
||||||
|
|||||||
Reference in New Issue
Block a user