From: Martin Galvan <martin.galvan@tallertechnologies.com>
To: gdb-patches@sourceware.org, dje@google.com
Subject: [PING][PATCH v3] Python API: Fix an exception when registering a global pretty-printer in verbose mode
Date: Tue, 21 Apr 2015 17:26:00 -0000 [thread overview]
Message-ID: <1429637147-5430-1-git-send-email-martin.galvan@tallertechnologies.com> (raw)
This patch fixes a Python exception that was being thrown when trying to register a global pretty-printer with verbose mode on:
File "/usr/share/gdb/python/gdb/printing.py", line 119, in register_pretty_printer
gdb.write("Registering global %s pretty-printer ...\n" % name)
NameError: name 'name' is not defined
This patch was previously accepted by Doug Evans (https://sourceware.org/ml/gdb-patches/2015-03/msg00312.html), but it was never committed.
I have a company-wide copyright assignment for gdb. I don't have commit access though, so it would be great if anyone could commit this for me. Thanks a lot!
Chamges in v3:
* Added the function name to the ChangeLog entry, and wrapped it at 80 characters.
Changes in v2:
* Moved printer.name to the next line so that it won't break the 80 character limit.
--
ChangeLog:
gdb/
2015-04-16 Martin Galvan <martin.galvan@tallertechnologies.com>
* python/lib/gdb/printing.py (register_pretty_printer): Fix exception
when registering a global pretty-printer in verbose mode.
---
gdb/python/lib/gdb/printing.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/python/lib/gdb/printing.py b/gdb/python/lib/gdb/printing.py
index e384e41..c935333 100644
--- a/gdb/python/lib/gdb/printing.py
+++ b/gdb/python/lib/gdb/printing.py
@@ -116,7 +116,8 @@ def register_pretty_printer(obj, printer, replace=False):
if obj is None:
if gdb.parameter("verbose"):
- gdb.write("Registering global %s pretty-printer ...\n" % name)
+ gdb.write("Registering global %s pretty-printer ...\n" %
+ printer.name)
obj = gdb
else:
if gdb.parameter("verbose"):
--
2.3.5
next reply other threads:[~2015-04-21 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 17:26 Martin Galvan [this message]
2015-04-22 19:35 ` Doug Evans
2015-04-22 19:36 ` Martin Galvan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429637147-5430-1-git-send-email-martin.galvan@tallertechnologies.com \
--to=martin.galvan@tallertechnologies.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox