From: Jonah Graham Date: Fri, 17 Mar 2017 14:57:44 +0000 (+0000) Subject: Fix PR gdb/19637: bound_registers.py: Add support for Python 3 X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=7503099f3e29739d34cb1224d54fba96404e6e61;p=deliverable%2Fbinutils-gdb.git Fix PR gdb/19637: bound_registers.py: Add support for Python 3 Fix this the same way gdb/python/lib/gdb/printing.py handles it. gdb/Changelog: 2017-03-17 Jonah Graham PR gdb/19637 * python/lib/gdb/printer/bound_registers.py: Add support for Python 3. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d0d0f72c87..6d81cf5256 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-03-17 Jonah Graham + + PR gdb/19637 + * python/lib/gdb/printer/bound_registers.py: Add support for + Python 3. + 2017-03-16 Andreas Arnez * dwarf2loc.c (indirect_synthetic_pointer): Get data type of diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py index b315690f0f..104ea7fb10 100644 --- a/gdb/python/lib/gdb/printer/bound_registers.py +++ b/gdb/python/lib/gdb/printer/bound_registers.py @@ -16,6 +16,11 @@ 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."""