Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r76842:1b705dee117d Date: 2015-04-20 10:58 +0200 http://bitbucket.org/pypy/pypy/changeset/1b705dee117d/
Log: Recognizes when we get a pointer expression, and dereference it automatically 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 @@ -55,10 +55,10 @@ class RPyType(Command): """ - Prints the RPython type of the expression (remember to dereference it!) + Prints the RPython type of the expression. E.g.: - (gdb) rpy_type *l_v123 + (gdb) rpy_type l_v123 GcStruct pypy.foo.Bar { super, inst_xxx, inst_yyy } """ @@ -88,6 +88,8 @@ offset = int(arg) except ValueError: obj = self.gdb.parse_and_eval(arg) + if obj.type.code == self.gdb.TYPE_CODE_PTR: + obj = obj.dereference() hdr = lookup(obj, '_gcheader') tid = hdr['h_tid'] if sys.maxsize < 2**32: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit