Returns a generator of all data variables provided by a named DebugInfoParser
(self, name: Optional[str] = None)
| 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']: |
no test coverage detected