summaryrefslogtreecommitdiff
path: root/python/typeprinter.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/typeprinter.py')
-rw-r--r--python/typeprinter.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/typeprinter.py b/python/typeprinter.py
index 3ad1e9f2..2177ba40 100644
--- a/python/typeprinter.py
+++ b/python/typeprinter.py
@@ -504,8 +504,15 @@ class CoreTypePrinter(TypePrinter):
type_ = types.Type.create(handle=core.BNNewTypeReference(core_lines[i].type), platform=data.platform)
root_type = types.Type.create(handle=core.BNNewTypeReference(core_lines[i].rootType), platform=data.platform)
root_type_name = core.pyNativeStr(core_lines[i].rootTypeName)
- line = types.TypeDefinitionLine(core_lines[i].lineType, tokens, type_, root_type, root_type_name,
- core_lines[i].offset, core_lines[i].fieldIndex)
+ if core_lines[i].baseType:
+ const_conf = types.BoolWithConfidence.get_core_struct(False, 0)
+ volatile_conf = types.BoolWithConfidence.get_core_struct(False, 0)
+ handle = core.BNCreateNamedTypeReference(core_lines[i].baseType, 0, 1, const_conf, volatile_conf)
+ base_type = types.NamedTypeReferenceType(handle, data.platform)
+ else:
+ base_type = None
+ line = types.TypeDefinitionLine(core_lines[i].lineType, tokens, type_, root_type, root_type_name, base_type,
+ core_lines[i].baseOffset, core_lines[i].offset, core_lines[i].fieldIndex)
lines.append(line)
core.BNFreeTypeDefinitionLineList(core_lines, count.value)
return lines