objects: Fixes for the comments in #159

This commit is contained in:
Mike Auty
2020-01-10 12:47:06 +00:00
committed by ikelos
parent d969d89da9
commit 3977a3c356
2 changed files with 8 additions and 8 deletions
@@ -73,6 +73,7 @@ class ObjectInformation(ReadOnlyMapping):
member_name: If the object was accessed as a member of a parent object, this was the name used to access it
parent: If the object was accessed as a member of a parent object, this is the parent object
native_layer_name: If this object references other objects (such as a pointer), what layer those objects live in
size: The size that the whole structure consumes in bytes
"""
super().__init__({
'layer_name': layer_name,
+7 -8
View File
@@ -678,14 +678,13 @@ class AggregateType(interfaces.objects.ObjectInterface):
relative_offset, template = self.vol.members[attr]
if isinstance(template, templates.ReferenceTemplate):
template = self._context.symbol_space.get_type(template.vol.type_name)
member = template(context = self._context,
object_info = interfaces.objects.ObjectInformation(
layer_name = self.vol.layer_name,
offset = mask & (self.vol.offset + relative_offset),
member_name = attr,
parent = self,
native_layer_name = self.vol.native_layer_name,
size = template.size))
object_info = interfaces.objects.ObjectInformation(layer_name = self.vol.layer_name,
offset = mask & (self.vol.offset + relative_offset),
member_name = attr,
parent = self,
native_layer_name = self.vol.native_layer_name,
size = template.size)
member = template(context = self._context, object_info = object_info)
self._concrete_members[attr] = member
return member
# We duplicate this code to avoid polluting the methodspace