MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / data_variables_from_parser

Method data_variables_from_parser

python/debuginfo.py:374–388  ·  view source on GitHub ↗

Returns a generator of all data variables provided by a named DebugInfoParser

(self, name: Optional[str] = None)

Source from the content-addressed store, hash-verified

372 return self.functions_from_parser()
373
374 def data_variables_from_parser(self, name: Optional[str] = None) -> Iterator['binaryview.DataVariableAndName']:
375 """Returns a generator of all data variables provided by a named DebugInfoParser"""
376 count = ctypes.c_ulonglong(0)
377 data_variables = core.BNGetDebugDataVariables(self.handle, name, count)
378 try:
379 assert data_variables is not None, "core.BNGetDebugDataVariables returned None"
380 for i in range(0, count.value):
381 yield binaryview.DataVariableAndName(
382 data_variables[i].address,
383 _types.Type.create(
384 core.BNNewTypeReference(data_variables[i].type), confidence=data_variables[i].typeConfidence
385 ), data_variables[i].name, data_variables[i].autoDiscovered
386 )
387 finally:
388 core.BNFreeDataVariablesAndName(data_variables, count.value)
389
390 @property
391 def data_variables(self) -> Iterator['binaryview.DataVariableAndName']:

Callers 1

data_variablesMethod · 0.95

Calls 2

DataVariableAndNameMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected