Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion boost/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,13 @@ def __init__(self, value):
# In Python 2 we add a __dict__ attribute explicitly.
if have_python_2:
self.__dict__ = {}
gdb.Value.__init__(value)
if '__init__' in gdb.Value.__dict__:
# GDB is v12 or newer.
# See https://github.com/bminor/binutils-gdb/commit/2988a36005f2821cee6744473ad8a3ba7638c212
gdb.Value.__init__(self, value)
else:
# GDB is older than v12. Don't need to do anything.
pass
self.qualifiers = get_type_qualifiers(value.type)
self.basic_type = get_basic_type(value.type)
self.type_name = str(self.basic_type)
Expand Down