diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2025-06-06 16:22:48 -0600 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2025-06-10 14:28:26 -0600 |
| commit | 3a1a81c3ddd8340432ecd2687d3a25195cc97d40 (patch) | |
| tree | cfc905bc5c8d14e2e4d344db4da04f202d47e80b /ui | |
| parent | d73188d9f304b242fa53594770806cd13bbe0259 (diff) | |
Add UI action and API to control switch recovery in HLIL
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/commands.h | 1 | ||||
| -rw-r--r-- | ui/flowgraphwidget.h | 3 | ||||
| -rw-r--r-- | ui/linearview.h | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/ui/commands.h b/ui/commands.h index 754d99a7..e8f12786 100644 --- a/ui/commands.h +++ b/ui/commands.h @@ -99,6 +99,7 @@ std::optional<uint64_t> getFoldableExprAddress( BinaryNinja::HighLevelILFunction* hlil, const HighlightTokenState& highlight); std::optional<uint64_t> getInvertableConditionAddress(BinaryNinja::HighLevelILFunction* hlil, size_t instrIndex); std::optional<uint64_t> getEarlyReturnAddress(BinaryNinja::HighLevelILFunction* hlil, size_t instrIndex); +std::optional<uint64_t> getSwitchRecoveryAddress(BinaryNinja::HighLevelILFunction* hlil, size_t instrIndex); /*! @} diff --git a/ui/flowgraphwidget.h b/ui/flowgraphwidget.h index d988da12..90b86000 100644 --- a/ui/flowgraphwidget.h +++ b/ui/flowgraphwidget.h @@ -172,6 +172,8 @@ class BINARYNINJAUIAPI FlowGraphWidget : bool getCurrentConditionInverted(); std::optional<uint64_t> getCurrentEarlyReturnAddress(); BNEarlyReturn getCurrentEarlyReturn(); + std::optional<uint64_t> getCurrentSwitchRecoveryAddress(); + BNSwitchRecovery getCurrentSwitchRecovery(); std::optional<std::pair<BinaryNinja::Variable, BinaryNinja::Variable>> getMergeVariablesAtCurrentLocation(); protected: @@ -404,6 +406,7 @@ class BINARYNINJAUIAPI FlowGraphWidget : void setCurrentExprFolding(BNExprFolding folding); void toggleConditionInverted(); void setCurrentEarlyReturn(BNEarlyReturn earlyReturn); + void setCurrentSwitchRecovery(BNSwitchRecovery recovery); void splitToNewTabAndNavigateFromCursorPosition(); void splitToNewWindowAndNavigateFromCursorPosition(); void splitToNewPaneAndNavigateFromCursorPosition(); diff --git a/ui/linearview.h b/ui/linearview.h index eea40d7f..9ba28407 100644 --- a/ui/linearview.h +++ b/ui/linearview.h @@ -322,6 +322,8 @@ class BINARYNINJAUIAPI LinearView : public QAbstractScrollArea, public View, pub bool getCurrentConditionInverted(); std::optional<uint64_t> getCurrentEarlyReturnAddress(); BNEarlyReturn getCurrentEarlyReturn(); + std::optional<uint64_t> getCurrentSwitchRecoveryAddress(); + BNSwitchRecovery getCurrentSwitchRecovery(); void setDataButtonVisible(bool visible); std::optional<std::pair<BinaryNinja::Variable, BinaryNinja::Variable>> getMergeVariablesAtCurrentLocation(); @@ -415,6 +417,7 @@ private Q_SLOTS: void setCurrentExprFolding(BNExprFolding folding); void toggleConditionInverted(); void setCurrentEarlyReturn(BNEarlyReturn earlyReturn); + void setCurrentSwitchRecovery(BNSwitchRecovery recovery); Q_SIGNALS: void notifyResizeEvent(int width, int height); |
