StackView Class Reference

Detailed Description

The stack view!

Public Member Functions

 StackView (ViewFrame *view, BinaryViewRef data)
 
void refresh ()
 Refresh the stack view's content. More...
 
void moveCursorToMouse (QMouseEvent *event, bool isSelecting)
 Move the cursor to approximate clicked position. More...
 
void ensureCursorIsVisible ()
 Ensure the cursor is visible by adjusting the scroll position. More...
 
void moveCursor (Direction dir)
 Move the cursor via the keyboard. More...
 
void sanitizeCursor (Direction preference)
 Ensure the cursor is not selecting any prohibited tokens. More...
 
const StackViewLineselectedLine () const
 Get the selected StackViewLine. More...
 
void renameVariable ()
 Rename the variable belonging to the selected line. More...
 
void retypeVariable ()
 Change the type of the variable belonging to the selected line. More...
 
void undefineVariable ()
 Undefine the variable belonging to the selected line. More...
 
void showCreateVariableDialog ()
 Show the "Create Variable" dialog. More...
 
void quickCreateIntegerAtCursor (size_t size)
 Create an integer of the given size at the cursor position. More...
 
void quickCreateArrayAtCursor ()
 Create an array at the cursor, spanning until the next stack variable. More...
 
void quickCreateStructAtCursor ()
 Create a new struct at the cursor, spanning until the next stack variable. More...
 
bool event (QEvent *event) override
 Override the default event handler so we can have nice tooltips. More...
 
BinaryViewRef getData () override
 
uint64_t getCurrentOffset () override
 
bool canCopyAddress () override
 
bool canPaste () override
 
void setSelectionOffsets (BNAddressRange range) override
 
bool navigate (uint64_t offset) override
 
QFont getFont () override
 
void updateFonts () override
 
- Public Member Functions inherited from View
 View ()
 
virtual ~View ()
 
void setupView (QWidget *widget)
 
virtual bool canAssemble ()
 
virtual bool canCompile ()
 
virtual bool findNextData (uint64_t start, uint64_t end, const BinaryNinja::DataBuffer &data, uint64_t &addr, BNFindFlag flags, const std::function< bool(size_t current, size_t total)> &cb)
 
virtual bool findNextText (uint64_t start, uint64_t end, const std::string &text, uint64_t &addr, DisassemblySettingsRef settings, BNFindFlag flags, BNFunctionGraphType graph, const std::function< bool(size_t current, size_t total)> &cb)
 
virtual bool findNextConstant (uint64_t start, uint64_t end, uint64_t constant, uint64_t &addr, DisassemblySettingsRef settings, BNFunctionGraphType graph, const std::function< bool(size_t current, size_t total)> &cb)
 
virtual bool findAllData (uint64_t start, uint64_t end, const BinaryNinja::DataBuffer &data, BNFindFlag flags, const std::function< bool(size_t current, size_t total)> &cb, const std::function< bool(uint64_t addr, const BinaryNinja::DataBuffer &match)> &matchCallback)
 
virtual bool findAllText (uint64_t start, uint64_t end, const std::string &data, DisassemblySettingsRef settings, BNFindFlag flags, BNFunctionGraphType graph, const std::function< bool(size_t current, size_t total)> &cb, const std::function< bool(uint64_t addr, const std::string &match, const BinaryNinja::LinearDisassemblyLine &line)> &matchCallback)
 
virtual bool findAllConstant (uint64_t start, uint64_t end, uint64_t constant, DisassemblySettingsRef settings, BNFunctionGraphType graph, const std::function< bool(size_t current, size_t total)> &cb, const std::function< bool(uint64_t addr, const BinaryNinja::LinearDisassemblyLine &line)> &matchCallback)
 
virtual BinaryViewRef getData ()=0
 
virtual uint64_t getCurrentOffset ()=0
 
virtual BNAddressRange getSelectionOffsets ()
 
virtual SelectionInfoForXref getSelectionForXref ()
 
virtual void setSelectionOffsets (BNAddressRange range)=0
 
virtual bool navigate (uint64_t offset)=0
 
virtual bool navigateToFunction (FunctionRef func, uint64_t offset)
 
virtual bool goToReference (FunctionRef func, uint64_t source, uint64_t target)
 
virtual bool navigateToViewLocation (const ViewLocation &viewLocation, bool center=false)
 
bool navigateOnOtherPane (uint64_t offset)
 
bool navigateToFunctionOnOtherPane (FunctionRef func, uint64_t offset)
 
bool isBinaryDataNavigable ()
 
void setBinaryDataNavigable (bool navigable)
 
virtual bool closeRequest ()
 
virtual void closing ()
 
virtual void updateFonts ()
 
virtual void updateTheme ()
 
virtual void undo ()
 
virtual void redo ()
 
virtual bool canUndo ()
 
virtual bool canRedo ()
 
virtual void cut ()
 
virtual void copy (TransformRef xform=nullptr)
 
virtual void copyAddress ()
 
virtual void paste (TransformRef xform=nullptr)
 
virtual bool canCut ()
 
virtual bool canCopy ()
 
virtual bool canCopyWithTransform ()
 
virtual bool canCopyAddress ()
 
virtual bool canPaste ()
 
virtual bool canPasteWithTransform ()
 
virtual void transform (TransformRef xform, bool encode)
 
virtual bool canTransform ()
 
virtual void writeData (const BinaryNinja::DataBuffer &data, uint64_t addr)
 
virtual bool canDisplayAs (const UIActionContext &context, const BNIntegerDisplayType)
 
virtual void displayAs (const UIActionContext &context, BNIntegerDisplayType type)
 
virtual BinaryNinja::Ref< HistoryEntrygetHistoryEntry ()
 
virtual void navigateToHistoryEntry (BinaryNinja::Ref< HistoryEntry > entry)
 
virtual StatusBarWidgetgetStatusBarWidget ()
 
virtual ViewPaneHeaderSubtypeWidgetgetHeaderSubtypeWidget ()
 
virtual QWidget * getHeaderOptionsWidget ()
 
virtual FunctionRef getCurrentFunction ()
 
virtual BasicBlockRef getCurrentBasicBlock ()
 
virtual ArchitectureRef getCurrentArchitecture ()
 
virtual LowLevelILFunctionRef getCurrentLowLevelILFunction ()
 
virtual MediumLevelILFunctionRef getCurrentMediumLevelILFunction ()
 
virtual HighLevelILFunctionRef getCurrentHighLevelILFunction ()
 
virtual BNFunctionGraphType getILViewType ()
 
virtual void setILViewType (BNFunctionGraphType ilViewType)
 
virtual size_t getCurrentILInstructionIndex ()
 
virtual QFont getFont ()=0
 
virtual DisassemblySettingsRef getDisassemblySettings ()
 
virtual void setDisassemblySettings (DisassemblySettingsRef settings)
 
virtual HighlightTokenState getHighlightTokenState ()
 
virtual UIActionContext actionContext ()
 
MenucontextMenu ()
 
UIActionHandleractionHandler ()
 
QWidget * widget ()
 
QString viewType ()
 
void updateCrossReferenceSelection (ViewFrame *frame=nullptr)
 
void forceSyncFromView (ViewFrame *frame=nullptr)
 
virtual void clearRelatedHighlights ()
 
virtual void setRelatedIndexHighlights (FunctionRef func, const std::set< size_t > &related)
 
virtual void setRelatedInstructionHighlights (FunctionRef func, const std::set< uint64_t > &related)
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseDoubleClickEvent (QMouseEvent *event) override
 
- Protected Member Functions inherited from View
bool writeDataToClipboard (const BinaryNinja::DataBuffer &data, bool binary, TransformRef xform)
 
BinaryNinja::DataBuffer readDataFromClipboard (TransformRef xform)
 
virtual std::string getNavigationMode ()
 
virtual void setNavigationMode (std::string mode)
 
virtual std::vector< std::string > getNavigationModes ()
 

Additional Inherited Members

- Static Public Member Functions inherited from View
static ViewgetViewFromWidget (QWidget *widget)
 
static void registerActions ()
 
static void registerLateActions ()
 
- Protected Attributes inherited from View
Menu m_contextMenu
 
UIActionHandler m_actionHandler
 
bool m_binaryDataNavigable = false
 
QPointer< TransformParameterDialogm_transformParamDialog
 

Constructor & Destructor Documentation

◆ StackView()

StackView::StackView ( ViewFrame view,
BinaryViewRef  data 
)

Member Function Documentation

◆ canCopyAddress()

bool StackView::canCopyAddress ( )
inlineoverridevirtual

Reimplemented from View.

◆ canPaste()

bool StackView::canPaste ( )
inlineoverridevirtual

Reimplemented from View.

◆ ensureCursorIsVisible()

void StackView::ensureCursorIsVisible ( )

Ensure the cursor is visible by adjusting the scroll position.

◆ event()

bool StackView::event ( QEvent *  event)
override

Override the default event handler so we can have nice tooltips.

◆ getCurrentOffset()

uint64_t StackView::getCurrentOffset ( )
overridevirtual

Implements View.

◆ getData()

BinaryViewRef StackView::getData ( )
overridevirtual

Implements View.

◆ getFont()

QFont StackView::getFont ( )
overridevirtual

Implements View.

◆ mouseDoubleClickEvent()

void StackView::mouseDoubleClickEvent ( QMouseEvent *  event)
overrideprotected

◆ mousePressEvent()

void StackView::mousePressEvent ( QMouseEvent *  event)
overrideprotected

◆ moveCursor()

void StackView::moveCursor ( Direction  dir)

Move the cursor via the keyboard.

◆ moveCursorToMouse()

void StackView::moveCursorToMouse ( QMouseEvent *  event,
bool  isSelecting 
)

Move the cursor to approximate clicked position.

◆ navigate()

bool StackView::navigate ( uint64_t  offset)
overridevirtual

Implements View.

◆ paintEvent()

void StackView::paintEvent ( QPaintEvent *  event)
overrideprotected

◆ quickCreateArrayAtCursor()

void StackView::quickCreateArrayAtCursor ( )

Create an array at the cursor, spanning until the next stack variable.

◆ quickCreateIntegerAtCursor()

void StackView::quickCreateIntegerAtCursor ( size_t  size)

Create an integer of the given size at the cursor position.

◆ quickCreateStructAtCursor()

void StackView::quickCreateStructAtCursor ( )

Create a new struct at the cursor, spanning until the next stack variable.

◆ refresh()

void StackView::refresh ( )

Refresh the stack view's content.

◆ renameVariable()

void StackView::renameVariable ( )

Rename the variable belonging to the selected line.

◆ retypeVariable()

void StackView::retypeVariable ( )

Change the type of the variable belonging to the selected line.

◆ sanitizeCursor()

void StackView::sanitizeCursor ( Direction  preference)

Ensure the cursor is not selecting any prohibited tokens.

◆ selectedLine()

const StackViewLine * StackView::selectedLine ( ) const

Get the selected StackViewLine.

◆ setSelectionOffsets()

void StackView::setSelectionOffsets ( BNAddressRange  range)
overridevirtual

Implements View.

◆ showCreateVariableDialog()

void StackView::showCreateVariableDialog ( )

Show the "Create Variable" dialog.

◆ undefineVariable()

void StackView::undefineVariable ( )

Undefine the variable belonging to the selected line.

◆ updateFonts()

void StackView::updateFonts ( )
overridevirtual

Reimplemented from View.


The documentation for this class was generated from the following file: