From: Orgad Shaneh <orgads@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Fix python compatibility with old gdb versions
Date: Wed, 08 Mar 2017 07:23:00 -0000 [thread overview]
Message-ID: <CAGHpTBLpHpuQNhzc031L+Zy4-tExP5S3bSJfra3iH6E=GYfmAQ@mail.gmail.com> (raw)
Type.name was introduced in GDB 7.9.
---
gdb/python/lib/gdb/printing.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/python/lib/gdb/printing.py b/gdb/python/lib/gdb/printing.py
index 181701c719..106da4ac8b 100644
--- a/gdb/python/lib/gdb/printing.py
+++ b/gdb/python/lib/gdb/printing.py
@@ -205,7 +205,7 @@ class RegexpCollectionPrettyPrinter(PrettyPrinter):
# Get the type name.
typename = gdb.types.get_basic_type(val.type).tag
- if not typename:
+ if not typename and hasattr(val.type, "name"):
typename = val.type.name
if not typename:
return None
--
2.12.0.windows.1
next reply other threads:[~2017-03-08 7:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 7:23 Orgad Shaneh [this message]
2017-06-11 13:55 ` Orgad Shaneh
2017-06-11 17:27 ` Simon Marchi
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='CAGHpTBLpHpuQNhzc031L+Zy4-tExP5S3bSJfra3iH6E=GYfmAQ@mail.gmail.com' \
--to=orgads@gmail.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