Fix PR gdb/19637: bound_registers.py: Add support for Python 3
authorJonah Graham <jonah@kichwacoders.com>
Fri, 17 Mar 2017 14:57:44 +0000 (14:57 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 17 Mar 2017 14:57:44 +0000 (14:57 +0000)
Fix this the same way gdb/python/lib/gdb/printing.py handles it.

gdb/Changelog:
2017-03-17  Jonah Graham  <jonah@kichwacoders.com>

PR gdb/19637
* python/lib/gdb/printer/bound_registers.py: Add support for
Python 3.

gdb/ChangeLog
gdb/python/lib/gdb/printer/bound_registers.py

index d0d0f72c87c68685c3d07d7d377a567db0dda9bd..6d81cf52569ea4987b1f8831cd5db42eccdab443 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
+
+       PR gdb/19637
+       * python/lib/gdb/printer/bound_registers.py: Add support for
+       Python 3.
+
 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
index b315690f0f49a51912ea3a92476c9116ae2899ed..104ea7fb105a4244833390b4d1ae0217a943d0e2 100644 (file)
 
 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."""
 
This page took 0.026431 seconds and 4 git commands to generate.