| 5421 | |
| 5422 | |
| 5423 | Ref<ExternalLocation> BinaryView::AddExternalLocation(Ref<Symbol> sourceSymbol, Ref<ExternalLibrary> library, std::optional<std::string> targetSymbol, std::optional<uint64_t> targetAddress, bool isAuto) |
| 5424 | { |
| 5425 | BNExternalLocation* loc = BNBinaryViewAddExternalLocation(m_object, |
| 5426 | sourceSymbol->GetObject(), |
| 5427 | library ? library->m_object : nullptr, |
| 5428 | targetSymbol.has_value() ? targetSymbol.value().c_str() : nullptr, |
| 5429 | targetAddress.has_value() ? &targetAddress.value() : nullptr, |
| 5430 | isAuto |
| 5431 | ); |
| 5432 | |
| 5433 | if (!loc) |
| 5434 | return nullptr; |
| 5435 | return new ExternalLocation(BNNewExternalLocationReference(loc)); |
| 5436 | } |
| 5437 | |
| 5438 | |
| 5439 | void BinaryView::RemoveExternalLocation(Ref<Symbol> sourceSymbol) |