diff options
| author | Glenn Smith <glenn@vector35.com> | 2024-05-08 12:10:47 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2024-05-08 12:10:47 -0400 |
| commit | 9355626405982962404231299703688263783871 (patch) | |
| tree | 1e7d7b38105ef175bc90a6dd150a33ce81307deb /ui/stackview.h | |
| parent | 9589986617465884691200589124370729603921 (diff) | |
Stack view: allow setting arbitrary base offset by double-click
Diffstat (limited to 'ui/stackview.h')
| -rw-r--r-- | ui/stackview.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/stackview.h b/ui/stackview.h index 12a8b87a..d198ff4d 100644 --- a/ui/stackview.h +++ b/ui/stackview.h @@ -4,6 +4,7 @@ #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> #include <QtWidgets/QLineEdit> +#include <optional> #include "dockhandler.h" #include "render.h" @@ -196,6 +197,9 @@ class BINARYNINJAUIAPI StackView : public QAbstractScrollArea, public View HighlightTokenState m_highlight; size_t m_lineIndex; size_t m_tokenIndex; + bool m_needFirstFocus; + + std::optional<int64_t> m_baseOffset; //! Bind and register all stack view actions. void setupActions(); @@ -272,6 +276,15 @@ class BINARYNINJAUIAPI StackView : public QAbstractScrollArea, public View //! Show the dialog to switch which base register is used for offsets void chooseBaseRegister(); + //! Show the dialog to pick a constant base offset + void chooseBaseOffset(); + + //! Set the base offset to a register (or clear on nullopt) + void setBaseRegister(ArchitectureRef arch, std::optional<std::string> regName); + + //! Set the base offset to a constant (or clear on nullopt) + void setBaseOffset(std::optional<int64_t> offset); + //! Override the default event handler so we can have nice tooltips. bool event(QEvent* event) override; |
