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

Method get_next_data_var_after

python/binaryview.py:7381–7407  ·  view source on GitHub ↗

``get_next_data_var_after`` retrieves the next :py:class:`DataVariable`, or None. :param int addr: the virtual address to start looking from. :return: the next :py:class:`DataVariable` :rtype: DataVariable :Example: >>> bv.get_next_data_var_after(0x10000000) <var 0x1000003c: int32

(self, addr: int)

Source from the content-addressed store, hash-verified

7379 return core.BNGetNextDataAfterAddress(self.handle, addr)
7380
7381 def get_next_data_var_after(self, addr: int) -> Optional['DataVariable']:
7382 """
7383 ``get_next_data_var_after`` retrieves the next :py:class:`DataVariable`, or None.
7384
7385 :param int addr: the virtual address to start looking from.
7386 :return: the next :py:class:`DataVariable`
7387 :rtype: DataVariable
7388 :Example:
7389
7390 >>> bv.get_next_data_var_after(0x10000000)
7391 <var 0x1000003c: int32_t>
7392 >>>
7393 """
7394 while True:
7395 next_data_var_start = core.BNGetNextDataVariableStartAfterAddress(self.handle, addr)
7396 if next_data_var_start == self.end:
7397 return None
7398 var = core.BNDataVariable()
7399 if not core.BNGetDataVariableAtAddress(self.handle, next_data_var_start, var):
7400 return None
7401 if var.address < next_data_var_start:
7402 addr = var.address + core.BNGetTypeWidth(var.type)
7403 continue
7404 break
7405 result = DataVariable.from_core_struct(var, self)
7406 core.BNFreeDataVariable(var)
7407 return result
7408
7409 def get_next_data_var_start_after(self, addr: int) -> int:
7410 """

Callers 1

make_codeFunction · 0.80

Calls 1

from_core_structMethod · 0.45

Tested by

no test coverage detected