Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jonah Graham <jonah@kichwacoders.com>
To: gdb-patches@sourceware.org
Cc: Jonah Graham <jonah@kichwacoders.com>
Subject: [PATCH] bound_registers.py: Add support for Python 3
Date: Sat, 26 Nov 2016 18:55:00 -0000	[thread overview]
Message-ID: <20161126185435.12434-1-jonah@kichwacoders.com> (raw)
In-Reply-To: <CAPmGMvgXuTqhWxXLihM1S_TF3gXF79cA=KrSDD46aqF_USNbDA@mail.gmail.com>

gdb/Changelog:

	* python/lib/gdb/printer/bound_registers.py: Add support
	for Python 3.
---
 gdb/ChangeLog                                 | 5 +++++
 gdb/python/lib/gdb/printer/bound_registers.py | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 745ab7b..7bf79e1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-20  Jonah Graham  <jonah@kichwacoders.com>
+
+	* python/lib/gdb/printer/bound_registers.py: Add support
+	for Python 3.
+
 2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	* ui-out.h (struct ui_out_impl): Remove comment.
diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py
index 9ff94aa..50509fb 100644
--- a/gdb/python/lib/gdb/printer/bound_registers.py
+++ b/gdb/python/lib/gdb/printer/bound_registers.py
@@ -14,8 +14,15 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import sys
+
 import gdb.printing
 
+if sys.version_info[0] > 2:
+    # Python 3 removed basestring and long
+    basestring = str
+    long = int
+
 class MpxBound128Printer:
     """Adds size field to a mpx __gdb_builtin_type_bound128 type."""
 
-- 
2.10.2


  reply	other threads:[~2016-11-26 18:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-20 20:47 Jonah Graham
2016-11-20 20:51 ` Jonah Graham
2016-11-23 16:59 ` Luis Machado
2016-11-23 22:40   ` Jonah Graham
2016-11-23 23:04     ` Luis Machado
2016-11-23 23:10       ` Jonah Graham
2016-11-26 16:28         ` Jonah Graham
2016-11-26 18:55           ` Jonah Graham
2016-11-26 18:55             ` Jonah Graham [this message]
2016-11-26 21:27           ` Luis Machado
2017-03-08  8:35             ` Jonah Graham
2017-03-17 15:00               ` Pedro Alves
2017-03-22  9:16                 ` Yao Qi
2017-03-22  9:38                   ` Jonah Graham
2017-03-22 11:26                     ` Yao Qi

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=20161126185435.12434-1-jonah@kichwacoders.com \
    --to=jonah@kichwacoders.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