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

Method get_symbol_at

python/binaryview.py:6088–6106  ·  view source on GitHub ↗

``get_symbol_at`` returns the Symbol at the provided virtual address. :param addr: virtual address to query for symbol :param namespace: (optional) the namespace of the symbols to retrieve :return: CoreSymbol for the given virtual address :rtype: CoreSymbol :Example: >>> bv.get_sym

(self, addr: int, namespace: '_types.NameSpaceType' = None)

Source from the content-addressed store, hash-verified

6086 return result
6087
6088 def get_symbol_at(self, addr: int, namespace: '_types.NameSpaceType' = None) -> Optional['_types.CoreSymbol']:
6089 """
6090 ``get_symbol_at`` returns the Symbol at the provided virtual address.
6091
6092 :param addr: virtual address to query for symbol
6093 :param namespace: (optional) the namespace of the symbols to retrieve
6094 :return: CoreSymbol for the given virtual address
6095 :rtype: CoreSymbol
6096 :Example:
6097
6098 >>> bv.get_symbol_at(bv.entry_point)
6099 <FunctionSymbol: "_start" @ 0x100001174>
6100 >>>
6101 """
6102 _namespace = _types.NameSpace.get_core_struct(namespace)
6103 sym = core.BNGetSymbolByAddress(self.handle, addr, _namespace)
6104 if sym is None:
6105 return None
6106 return _types.CoreSymbol(sym)
6107
6108 def get_symbols_by_raw_name(self, name: str, namespace: '_types.NameSpaceType' = None) -> List['_types.CoreSymbol']:
6109 _namespace = _types.NameSpace.get_core_struct(namespace)

Callers 6

symbolMethod · 0.45
_get_current_symbolFunction · 0.45
save_svgFunction · 0.45
perform_get_expr_textMethod · 0.45
feature_map.pyFile · 0.45

Calls 1

get_core_structMethod · 0.45

Tested by

no test coverage detected