Add an ExternalLocation with its source in this BinaryView. ExternalLocations must have a target address and/or symbol. :param source_symbol: Symbol that the association is from :param library: Library that the ExternalLocation belongs to :param target_symbol: Symbol that the ExternalLoc
(self, source_symbol: '_types.CoreSymbol', library: Optional[externallibrary.ExternalLibrary], target_symbol: Optional[str], target_address: Optional[int], auto: bool = False)
| 10016 | core.BNFreeExternalLibraryList(handles, count.value) |
| 10017 | |
| 10018 | def add_external_location(self, source_symbol: '_types.CoreSymbol', library: Optional[externallibrary.ExternalLibrary], target_symbol: Optional[str], target_address: Optional[int], auto: bool = False) -> externallibrary.ExternalLocation: |
| 10019 | """ |
| 10020 | Add an ExternalLocation with its source in this BinaryView. |
| 10021 | ExternalLocations must have a target address and/or symbol. |
| 10022 | |
| 10023 | :param source_symbol: Symbol that the association is from |
| 10024 | :param library: Library that the ExternalLocation belongs to |
| 10025 | :param target_symbol: Symbol that the ExternalLocation points to |
| 10026 | :param target_address: Address that the ExternalLocation points to |
| 10027 | :param auto: Whether or not this action is the result of automated analysis |
| 10028 | :return: The created ExternalLocation |
| 10029 | """ |
| 10030 | c_addr = None |
| 10031 | if target_address is not None: |
| 10032 | c_addr = ctypes.c_ulonglong(target_address) |
| 10033 | elif target_symbol is None: |
| 10034 | raise ExternalLinkException("External locations must have a target address and/or symbol") |
| 10035 | |
| 10036 | handle = core.BNBinaryViewAddExternalLocation(self.handle, source_symbol.handle, library._handle if library else None, target_symbol, c_addr, auto) |
| 10037 | assert handle is not None, "core.BNBinaryViewAddExternalLocation returned None" |
| 10038 | return externallibrary.ExternalLocation(handle) |
| 10039 | |
| 10040 | def remove_external_location(self, source_symbol: '_types.CoreSymbol'): |
| 10041 | """ |
nothing calls this directly
no test coverage detected