diff options
| author | Brian Potchik <brian@vector35.com> | 2024-03-14 12:43:05 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2024-03-14 12:43:05 -0400 |
| commit | 6e04c943e75ebdfbc6e940d0aa3d88a54b4c264b (patch) | |
| tree | b47ffcdaacba453fe39de077f914f4000f732a67 /binaryview.cpp | |
| parent | bf8b662124aeb1cf6e79045b3d4de3fd1cdd89a8 (diff) | |
Add support for advanced binary search.
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 0dd6d8f8..feb3b765 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -4610,6 +4610,14 @@ bool BinaryView::FindAllConstant(uint64_t start, uint64_t end, uint64_t constant } +bool BinaryView::Search(const string& query, const std::function<bool(uint64_t offset, const DataBuffer& buffer)>& otherCallback) +{ + MatchCallbackContextForDataBuffer mc; + mc.func = otherCallback; + return BNSearch(m_object, query.c_str(), &mc, MatchCallbackForDataBuffer); +} + + void BinaryView::Reanalyze() { BNReanalyzeAllFunctions(m_object); |
