diff options
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 343dc322..2be28283 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -3185,6 +3185,22 @@ std::vector<Ref<Component>> BinaryView::GetDataVariableParentComponents(DataVari } +std::optional<BNStringType> BinaryView::CheckForStringAnnotationType(uint64_t addr, string& value, bool allowShortStrings, bool allowLargeStrings, size_t childWidth) +{ + char* str = nullptr; + BNStringType type; + bool result = BNCheckForStringAnnotationType(m_object, addr, &str, &type, + allowShortStrings, allowLargeStrings, childWidth); + if (result) + { + value = string(str); + BNFreeString(str); + return type; + } + return std::nullopt; +} + + bool BinaryView::CanAssemble(Architecture* arch) { return BNCanAssemble(m_object, arch->GetObject()); @@ -3303,12 +3319,6 @@ Ref<BackgroundTask> BinaryView::GetBackgroundAnalysisTask() } -size_t BinaryView::GetFullStringSize(uint64_t addr, BNStringType type) -{ - return BNGetFullStringSize(m_object, addr, type); -} - - uint64_t BinaryView::GetNextFunctionStartAfterAddress(uint64_t addr) { return BNGetNextFunctionStartAfterAddress(m_object, addr); |
