MCPcopy Index your code
hub / github.com/nodejs/node / Read

Method Read

deps/v8/tools/grokdump.py:97–114  ·  view source on GitHub ↗
(self, memory, offset)

Source from the content-addressed store, hash-verified

95 self.size = ctypes.sizeof(self.ctype)
96
97 def Read(self, memory, offset):
98 if self.is_flexible:
99 fields_copy = self.fields[:]
100 last = 0
101 for name, type_or_func in fields_copy:
102 if isinstance(type_or_func, types.FunctionType):
103 partial_ctype = Descriptor._GetCtype(fields_copy[:last])
104 partial_object = partial_ctype.from_buffer(memory, offset)
105 type = type_or_func(partial_object)
106 if type is not None:
107 fields_copy[last] = (name, type)
108 last += 1
109 else:
110 last += 1
111 complete_ctype = Descriptor._GetCtype(fields_copy[:last])
112 else:
113 complete_ctype = self.ctype
114 return complete_ctype.from_buffer(memory, offset)
115
116 @staticmethod
117 def _GetCtype(fields):

Callers 4

__init__Method · 0.45
_ReadArchitectureMethod · 0.45
_ReadDirectoriesMethod · 0.45
ReadMinidumpStringMethod · 0.45

Calls 1

_GetCtypeMethod · 0.80

Tested by

no test coverage detected