GeezerVison is showing github.com — Expose AnalysisState through the API · Vector35/binaryninja-api@d4f7a4b
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: binaryninjaapi.h +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -6109,6 +6109,7 @@ namespace BinaryNinja { |
6109 | 6109 |
|
6110 | 6110 | AnalysisInfo GetAnalysisInfo(); |
6111 | 6111 | BNAnalysisProgress GetAnalysisProgress(); |
| 6112 | + BNAnalysisState GetAnalysisState(); |
6112 | 6113 | Ref<BackgroundTask> GetBackgroundAnalysisTask(); |
6113 | 6114 |
|
6114 | 6115 | /*! Returns the virtual address of the Function that occurs after the virtual address `addr` |
|
Collapse file
Copy file name to clipboardExpand all lines: binaryninjacore.h +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5068,6 +5068,7 @@ extern "C" |
5068 | 5068 | BINARYNINJACOREAPI BNAnalysisInfo* BNGetAnalysisInfo(BNBinaryView* view); |
5069 | 5069 | BINARYNINJACOREAPI void BNFreeAnalysisInfo(BNAnalysisInfo* info); |
5070 | 5070 | BINARYNINJACOREAPI BNAnalysisProgress BNGetAnalysisProgress(BNBinaryView* view); |
| 5071 | + BINARYNINJACOREAPI BNAnalysisState BNGetAnalysisState(BNBinaryView* view); |
5071 | 5072 | BINARYNINJACOREAPI BNBackgroundTask* BNGetBackgroundAnalysisTask(BNBinaryView* view); |
5072 | 5073 |
|
5073 | 5074 | BINARYNINJACOREAPI uint64_t BNGetNextFunctionStartAfterAddress(BNBinaryView* view, uint64_t addr); |
|
Collapse file
Copy file name to clipboardExpand all lines: binaryview.cpp +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -3823,6 +3823,12 @@ BNAnalysisProgress BinaryView::GetAnalysisProgress() |
3823 | 3823 | } |
3824 | 3824 |
|
3825 | 3825 |
|
| 3826 | +BNAnalysisState BinaryView::GetAnalysisState() |
| 3827 | +{ |
| 3828 | + return BNGetAnalysisState(m_object); |
| 3829 | +} |
| 3830 | + |
| 3831 | + |
3826 | 3832 | Ref<BackgroundTask> BinaryView::GetBackgroundAnalysisTask() |
3827 | 3833 | { |
3828 | 3834 | BNBackgroundTask* task = BNGetBackgroundAnalysisTask(m_object); |
|
Collapse file
Copy file name to clipboardExpand all lines: python/binaryview.py +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -3371,6 +3371,11 @@ def analysis_progress(self) -> AnalysisProgress: |
3371 | 3371 | result = core.BNGetAnalysisProgress(self.handle) |
3372 | 3372 | return AnalysisProgress(result.state, result.count, result.total) |
3373 | 3373 |
|
| 3374 | + @property |
| 3375 | + def analysis_state(self) -> AnalysisState: |
| 3376 | + """State of current analysis (read-only)""" |
| 3377 | + return core.BNGetAnalysisState(self.handle) |
| 3378 | + |
3374 | 3379 | @property |
3375 | 3380 | def linear_disassembly(self) -> Iterator['lineardisassembly.LinearDisassemblyLine']: |
3376 | 3381 | """Iterator for all lines in the linear disassembly of the view""" |
|