summaryrefslogtreecommitdiff
path: root/binaryview.cpp
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2024-02-13 13:10:11 -0500
committerJosh Ferrell <josh@vector35.com>2024-02-13 13:45:51 -0500
commit3607e3a8a94c1f1e16caa099bd81eaba6e182cb7 (patch)
tree4a4573da7d5c9246edaeec471fbdff9365089190 /binaryview.cpp
parentd1915bec3ee94c978f096a824a6eee73e5c6be26 (diff)
Rename ExternalLocation APIs to be more clear, add ExternalLocation and ExternalLibrary API documentation
Diffstat (limited to 'binaryview.cpp')
-rw-r--r--binaryview.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/binaryview.cpp b/binaryview.cpp
index 057c0954..0dd6d8f8 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -5139,13 +5139,13 @@ std::vector<Ref<ExternalLibrary>> BinaryView::GetExternalLibraries()
}
-Ref<ExternalLocation> BinaryView::AddExternalLocation(Ref<Symbol> internalSymbol, Ref<ExternalLibrary> library, std::optional<std::string> externalSymbol, std::optional<uint64_t> externalAddress, bool isAuto)
+Ref<ExternalLocation> BinaryView::AddExternalLocation(Ref<Symbol> sourceSymbol, Ref<ExternalLibrary> library, std::optional<std::string> targetSymbol, std::optional<uint64_t> targetAddress, bool isAuto)
{
BNExternalLocation* loc = BNBinaryViewAddExternalLocation(m_object,
- internalSymbol->GetObject(),
+ sourceSymbol->GetObject(),
library ? library->m_object : nullptr,
- externalSymbol.has_value() ? externalSymbol.value().c_str() : nullptr,
- externalAddress.has_value() ? &externalAddress.value() : nullptr,
+ targetSymbol.has_value() ? targetSymbol.value().c_str() : nullptr,
+ targetAddress.has_value() ? &targetAddress.value() : nullptr,
isAuto
);
@@ -5155,15 +5155,15 @@ Ref<ExternalLocation> BinaryView::AddExternalLocation(Ref<Symbol> internalSymbol
}
-void BinaryView::RemoveExternalLocation(Ref<Symbol> internalSymbol)
+void BinaryView::RemoveExternalLocation(Ref<Symbol> sourceSymbol)
{
- BNBinaryViewRemoveExternalLocation(m_object, internalSymbol->GetObject());
+ BNBinaryViewRemoveExternalLocation(m_object, sourceSymbol->GetObject());
}
-Ref<ExternalLocation> BinaryView::GetExternalLocation(Ref<Symbol> internalSymbol)
+Ref<ExternalLocation> BinaryView::GetExternalLocation(Ref<Symbol> sourceSymbol)
{
- BNExternalLocation* loc = BNBinaryViewGetExternalLocation(m_object, internalSymbol->GetObject());
+ BNExternalLocation* loc = BNBinaryViewGetExternalLocation(m_object, sourceSymbol->GetObject());
if (!loc)
return nullptr;
return new ExternalLocation(BNNewExternalLocationReference(loc));