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

Method _to_core_struct

python/function.py:3555–3577  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3553 )
3554
3555 def _to_core_struct(self) -> core.BNDisassemblyTextLine:
3556 result = core.BNDisassemblyTextLine()
3557 result.addr = self.address
3558 if self.il_instruction is not None:
3559 result.instrIndex = self.il_instruction.instr_index
3560 else:
3561 result.instrIndex = 0xffffffffffffffff
3562 result.tokens = InstructionTextToken._get_core_struct(self.tokens)
3563 result.count = len(self.tokens)
3564 result.highlight = self.highlight._to_core_struct()
3565 result.tagCount = len(self.tags)
3566 result.tags = (ctypes.POINTER(core.BNTag) * len(self.tags))()
3567 for i, tag in enumerate(self.tags):
3568 result.tags[i] = tag.handle
3569 if self.type_info is None:
3570 result.typeInfo.hasTypeInfo = False
3571 else:
3572 result.typeInfo.hasTypeInfo = True
3573 if self.type_info.parent_type is not None:
3574 result.typeInfo.parentType = self.type_info.parent_type.handle
3575 result.typeInfo.fieldIndex = self.type_info.field_index
3576 result.typeInfo.offset = self.type_info.offset
3577 return result
3578
3579
3580class DisassemblyTextRenderer:

Callers

nothing calls this directly

Calls 2

_get_core_structMethod · 0.80
_to_core_structMethod · 0.45

Tested by

no test coverage detected