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

Method _get_instruction_text

python/architecture.py:670–687  ·  view source on GitHub ↗
(self, ctxt, data, addr, length, result, count)

Source from the content-addressed store, hash-verified

668 return False
669
670 def _get_instruction_text(self, ctxt, data, addr, length, result, count):
671 try:
672 buf = ctypes.create_string_buffer(length[0])
673 ctypes.memmove(buf, data, length[0])
674 info = self.get_instruction_text(buf.raw, addr)
675 if info is None:
676 return False
677 tokens = info[0]
678 length[0] = info[1]
679 count[0] = len(tokens)
680 token_buf = function.InstructionTextToken._get_core_struct(tokens)
681 result[0] = token_buf
682 ptr = ctypes.cast(token_buf, ctypes.c_void_p)
683 self._pending_token_lists[ptr.value] = (ptr.value, token_buf)
684 return True
685 except:
686 log_error(traceback.format_exc())
687 return False
688
689 def _free_instruction_text(self, tokens, count):
690 try:

Callers

nothing calls this directly

Calls 3

get_instruction_textMethod · 0.95
log_errorFunction · 0.85
_get_core_structMethod · 0.80

Tested by

no test coverage detected