Commit 814c6376 authored by Mark Florisson's avatar Mark Florisson

Handle error in lookup of 'ob_base' (in case the memory can't be read)

parent f90c4d3f
......@@ -165,8 +165,11 @@ class PyObjectPtr(object):
return self._gdbval.dereference()[name]
except RuntimeError:
# Python 3:
return self._gdbval.dereference()['ob_base'][name]
try:
return self._gdbval.dereference()['ob_base'][name]
except RuntimeError:
return 0
# General case: look it up inside the object:
return self._gdbval.dereference()[name]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment