bound_registers.py: Add support for Python 3
Commit Message
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(+)
@@ -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.
@@ -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."""