Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r76845:8f152d9a1096 Date: 2015-04-20 11:10 +0200 http://bitbucket.org/pypy/pypy/changeset/8f152d9a1096/
Log: more py3 fixes diff --git a/pypy/tool/gdb_pypy.py b/pypy/tool/gdb_pypy.py --- a/pypy/tool/gdb_pypy.py +++ b/pypy/tool/gdb_pypy.py @@ -82,11 +82,13 @@ imp.reload(gdb_pypy) gdb_pypy.RPyType.prog2typeids = self.prog2typeids # persist the cache self.__class__ = gdb_pypy.RPyType - print (self.do_invoke(arg, from_tty).decode('latin-1')) + result = self.do_invoke(arg, from_tty) + if not isinstance(result, str): + result = result.decode('latin-1') + print(result) except: import traceback traceback.print_exc() - raise def do_invoke(self, arg, from_tty): try: @@ -107,7 +109,7 @@ if offset in typeids: return typeids[offset] else: - return 'Cannot find the type with offset %d' % offset + return 'Cannot find the type with offset 0x%x' % offset def get_typeids(self): try: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit