Loading...
Searching...
No Matches

Detailed Description

Classes

class  VariableListItem
 An item part of VariableListModel. More...
class  VariableListModel
 The backing model for the variable list widget, holds VariableListItem. More...
class  VariableListItemDelegate
class  VariableList
 The main variable list dock widget. More...
class  VariableListSidebarWidgetType
 The main variable list dock widget. More...

Enumerations

enum class  VariableListItemType { VariableListItemType::LocalVariable , VariableListItemType::DataVariable }
 A variable list item can represent either a function-local variable, or a data variable referenced by the current function. More...

Class Documentation

◆ VariableListItem

class VariableListItem

An item part of VariableListModel.

Public Member Functions

 VariableListItem (FunctionRef func, BinaryNinja::Variable var, BinaryNinja::PossibleValueSet pvs, bool hasUidf, std::string name, bool showPlacementInformation)
 Create a new VariableListItem of the LocalVariable type.
 VariableListItem (FunctionRef func, BinaryNinja::DataVariable dataVar, uint64_t refPoint, std::string name, bool showPlacementInformation)
 Create a new VariableListItem of the DataVariable type.
VariableListItemType type () const
 Get the type of this list item.
std::string name () const
 Get the represented variable's display name.
std::string constantValue () const
 Get the data variable's value; use with data variable items only.
BinaryNinja::PossibleValueSet possibleValueSet () const
 Get the variable possible value set; use with local variable items only.
bool hasUidf () const
 Is the PVS user-provided? Use with local variable items only.
std::vector< BinaryNinja::InstructionTextTokentokensBeforeName () const
std::vector< BinaryNinja::InstructionTextTokentokensAfterName () const
void displayVariablePlacementInfo (std::vector< BinaryNinja::InstructionTextToken > &tokens) const
std::vector< BinaryNinja::InstructionTextTokendisplayTokens () const
 Shorthand to get concatenated type, name, and value tokens.
BinaryNinja::Variable variable () const
 Get the represented variable; use with variable items only.
BinaryNinja::DataVariable dataVariable () const
 Get the represented data variable; use with data variable items only.
uint64_t refPoint () const
 Get the first use of this variable; use with data variables items only.
bool isUserDefined () const
 Is any part of this item user-defined?

Constructor & Destructor Documentation

◆ VariableListItem() [1/2]

VariableListItem::VariableListItem ( FunctionRef func,
BinaryNinja::Variable var,
BinaryNinja::PossibleValueSet pvs,
bool hasUidf,
std::string name,
bool showPlacementInformation )

Create a new VariableListItem of the LocalVariable type.

◆ VariableListItem() [2/2]

VariableListItem::VariableListItem ( FunctionRef func,
BinaryNinja::DataVariable dataVar,
uint64_t refPoint,
std::string name,
bool showPlacementInformation )

Create a new VariableListItem of the DataVariable type.

Member Function Documentation

◆ type()

VariableListItemType VariableListItem::type ( ) const

Get the type of this list item.

◆ name()

std::string VariableListItem::name ( ) const

Get the represented variable's display name.

◆ constantValue()

std::string VariableListItem::constantValue ( ) const

Get the data variable's value; use with data variable items only.

◆ possibleValueSet()

BinaryNinja::PossibleValueSet VariableListItem::possibleValueSet ( ) const

Get the variable possible value set; use with local variable items only.

◆ hasUidf()

bool VariableListItem::hasUidf ( ) const

Is the PVS user-provided? Use with local variable items only.

◆ tokensBeforeName()

std::vector< BinaryNinja::InstructionTextToken > VariableListItem::tokensBeforeName ( ) const

◆ tokensAfterName()

std::vector< BinaryNinja::InstructionTextToken > VariableListItem::tokensAfterName ( ) const

◆ displayVariablePlacementInfo()

void VariableListItem::displayVariablePlacementInfo ( std::vector< BinaryNinja::InstructionTextToken > & tokens) const

◆ displayTokens()

std::vector< BinaryNinja::InstructionTextToken > VariableListItem::displayTokens ( ) const

Shorthand to get concatenated type, name, and value tokens.

◆ variable()

BinaryNinja::Variable VariableListItem::variable ( ) const

Get the represented variable; use with variable items only.

◆ dataVariable()

BinaryNinja::DataVariable VariableListItem::dataVariable ( ) const

Get the represented data variable; use with data variable items only.

◆ refPoint()

uint64_t VariableListItem::refPoint ( ) const

Get the first use of this variable; use with data variables items only.

◆ isUserDefined()

bool VariableListItem::isUserDefined ( ) const

Is any part of this item user-defined?

◆ VariableListModel

class VariableListModel

The backing model for the variable list widget, holds VariableListItem.

Public Member Functions

 VariableListModel (QWidget *parent, ViewFrame *view, BinaryViewRef data)
void clear ()
 Clear the list's content.
FunctionRef function () const
 Get the current function.
const BinaryNinja::FunctionViewTypefunctionType () const
 Get the current function type.
bool functionExceedsComplexity () const
 Whether or not the function exceeds the set complexity threshold.
bool showPlacementInformation () const
 Get the showPlacementInformation setting.
void setFunction (FunctionRef func, const BinaryNinja::FunctionViewType &il, const HighlightTokenState &hts)
 Set the focused function and update the content of the list.
void setSelectionModel (QItemSelectionModel *model)
 Set the selection model, should correspond to the parent widget's.
virtual QVariant data (const QModelIndex &i, int role) const override
virtual QModelIndex index (int row, int col, const QModelIndex &parent=QModelIndex()) const override
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const override
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const override
Qt::ItemFlags flags (const QModelIndex &index) const override
virtual QVariant headerData (int column, Qt::Orientation orientation, int role) const override
void linkActivatedEvent (const QString &link)

Constructor & Destructor Documentation

◆ VariableListModel()

VariableListModel::VariableListModel ( QWidget * parent,
ViewFrame * view,
BinaryViewRef data )

Member Function Documentation

◆ clear()

void VariableListModel::clear ( )

Clear the list's content.

◆ function()

FunctionRef VariableListModel::function ( ) const

Get the current function.

◆ functionType()

const BinaryNinja::FunctionViewType & VariableListModel::functionType ( ) const

Get the current function type.

◆ functionExceedsComplexity()

bool VariableListModel::functionExceedsComplexity ( ) const
inline

Whether or not the function exceeds the set complexity threshold.

◆ showPlacementInformation()

bool VariableListModel::showPlacementInformation ( ) const
inline

Get the showPlacementInformation setting.

◆ setFunction()

void VariableListModel::setFunction ( FunctionRef func,
const BinaryNinja::FunctionViewType & il,
const HighlightTokenState & hts )

Set the focused function and update the content of the list.

◆ setSelectionModel()

void VariableListModel::setSelectionModel ( QItemSelectionModel * model)

Set the selection model, should correspond to the parent widget's.

◆ data()

virtual QVariant VariableListModel::data ( const QModelIndex & i,
int role ) const
overridevirtual

◆ index()

virtual QModelIndex VariableListModel::index ( int row,
int col,
const QModelIndex & parent = QModelIndex() ) const
overridevirtual

◆ columnCount()

virtual int VariableListModel::columnCount ( const QModelIndex & parent = QModelIndex()) const
overridevirtual

◆ rowCount()

virtual int VariableListModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
overridevirtual

◆ flags()

Qt::ItemFlags VariableListModel::flags ( const QModelIndex & index) const
override

◆ headerData()

virtual QVariant VariableListModel::headerData ( int column,
Qt::Orientation orientation,
int role ) const
overridevirtual

◆ linkActivatedEvent()

void VariableListModel::linkActivatedEvent ( const QString & link)

◆ VariableListItemDelegate

class VariableListItemDelegate

Public Member Functions

 VariableListItemDelegate (QObject *parent=nullptr)
void paint (QPainter *painter, const QStyleOptionViewItem &opt, const QModelIndex &index) const
QSize sizeHint (const QStyleOptionViewItem &opt, const QModelIndex &index) const

Constructor & Destructor Documentation

◆ VariableListItemDelegate()

VariableListItemDelegate::VariableListItemDelegate ( QObject * parent = nullptr)
inline

Member Function Documentation

◆ paint()

void VariableListItemDelegate::paint ( QPainter * painter,
const QStyleOptionViewItem & opt,
const QModelIndex & index ) const

◆ sizeHint()

QSize VariableListItemDelegate::sizeHint ( const QStyleOptionViewItem & opt,
const QModelIndex & index ) const

◆ VariableList

class VariableList

The main variable list dock widget.

Public Member Functions

 VariableList (ViewFrame *view, BinaryViewRef data)
QWidget * headerWidget () override
void focus () override
void refresh ()
VariableListItemselectedItem () const
 Get the VariableListItem corresponding to the current selection.
void showHamburgerMenu () const
void changeSelectedVariableName ()
 Show the rename dialog for the selected variable.
void changeSelectedVariableType ()
 Show the new type dialog for the selected variable.
void mergeSelectedVariable ()
 Show the "merge variables" dialog for the selected variable.
void clearSelectedVariableName ()
 Clear the selected variable's name.
void clearSelectedVariableType ()
 Clear the selected variable's type.
void clearSelectedVariableNameAndType ()
 Undefine the selected variable's user symbol.
void showSelectedVariableFirstUsage ()
 Navigate to the first usage of the selected variable.
void showSelectedDataVariableDefinition ()
 Navigate to the definition of the selected data variable.
void setSelectedVariableDeadStoreElimination (BNDeadStoreElimination dse)
 Set the selected variable's DSE policy.
void setSelectedVariableValue ()
 Prompt the user to set the selected variable's value.
void resetSelectedVariableValue ()
 Remove UIDF for the selected variable.
void copy ()
 Copy selected variables to clipboard.
virtual void setFilter (const std::string &filter) override
virtual void scrollToFirstItem () override
virtual void scrollToCurrentItem () override
virtual void ensureSelection () override
virtual void activateSelection () override
Public Member Functions inherited from SidebarWidget
 SidebarWidget (const QString &title)
 ~SidebarWidget ()
const QString & title () const
void setTitle (const QString &title)
void enableRefreshTimer (int interval)
void setRefreshQuiesce (bool enable)
bool isQuiesced () const
virtual void notifyRefresh ()
virtual void notifyQuiesce (bool)
virtual void notifyFontChanged ()
virtual void notifyOffsetChanged (uint64_t)
virtual void notifyThemeChanged ()
virtual void notifyViewChanged (ViewFrame *)
virtual void notifyViewLocationChanged (View *, const ViewLocation &)
virtual void closing ()
virtual void setPrimaryOrientation (Qt::Orientation)
Public Member Functions inherited from FilterTarget
virtual ~FilterTarget ()
virtual void closeFilter ()

Additional Inherited Members

Protected Attributes inherited from SidebarWidget
QString m_title
UIActionHandler m_actionHandler
ContextMenuManagerm_contextMenuManager = nullptr
Menum_menu = nullptr
bool m_quiesceState = true
QTimer * m_updateTimer = nullptr

Constructor & Destructor Documentation

◆ VariableList()

VariableList::VariableList ( ViewFrame * view,
BinaryViewRef data )

Member Function Documentation

◆ headerWidget()

QWidget * VariableList::headerWidget ( )
inlineoverridevirtual

Reimplemented from SidebarWidget.

◆ focus()

void VariableList::focus ( )
inlineoverridevirtual

Reimplemented from SidebarWidget.

◆ refresh()

void VariableList::refresh ( )

◆ selectedItem()

VariableListItem * VariableList::selectedItem ( ) const

Get the VariableListItem corresponding to the current selection.

◆ showHamburgerMenu()

void VariableList::showHamburgerMenu ( ) const

◆ changeSelectedVariableName()

void VariableList::changeSelectedVariableName ( )

Show the rename dialog for the selected variable.

◆ changeSelectedVariableType()

void VariableList::changeSelectedVariableType ( )

Show the new type dialog for the selected variable.

◆ mergeSelectedVariable()

void VariableList::mergeSelectedVariable ( )

Show the "merge variables" dialog for the selected variable.

◆ clearSelectedVariableName()

void VariableList::clearSelectedVariableName ( )

Clear the selected variable's name.

◆ clearSelectedVariableType()

void VariableList::clearSelectedVariableType ( )

Clear the selected variable's type.

◆ clearSelectedVariableNameAndType()

void VariableList::clearSelectedVariableNameAndType ( )

Undefine the selected variable's user symbol.

◆ showSelectedVariableFirstUsage()

void VariableList::showSelectedVariableFirstUsage ( )

Navigate to the first usage of the selected variable.

◆ showSelectedDataVariableDefinition()

void VariableList::showSelectedDataVariableDefinition ( )

Navigate to the definition of the selected data variable.

◆ setSelectedVariableDeadStoreElimination()

void VariableList::setSelectedVariableDeadStoreElimination ( BNDeadStoreElimination dse)

Set the selected variable's DSE policy.

◆ setSelectedVariableValue()

void VariableList::setSelectedVariableValue ( )

Prompt the user to set the selected variable's value.

◆ resetSelectedVariableValue()

void VariableList::resetSelectedVariableValue ( )

Remove UIDF for the selected variable.

◆ copy()

void VariableList::copy ( )

Copy selected variables to clipboard.

◆ setFilter()

virtual void VariableList::setFilter ( const std::string & filter)
overridevirtual

Implements FilterTarget.

◆ scrollToFirstItem()

virtual void VariableList::scrollToFirstItem ( )
overridevirtual

Implements FilterTarget.

◆ scrollToCurrentItem()

virtual void VariableList::scrollToCurrentItem ( )
overridevirtual

Implements FilterTarget.

◆ ensureSelection()

virtual void VariableList::ensureSelection ( )
overridevirtual

Implements FilterTarget.

◆ activateSelection()

virtual void VariableList::activateSelection ( )
overridevirtual

Implements FilterTarget.

◆ VariableListSidebarWidgetType

class VariableListSidebarWidgetType

The main variable list dock widget.

Public Member Functions

 VariableListSidebarWidgetType ()
virtual SidebarWidgetcreateWidget (ViewFrame *frame, BinaryViewRef data) override
virtual SidebarWidgetLocation defaultLocation () const override
Public Member Functions inherited from SidebarWidgetType
 SidebarWidgetType (const QImage &icon, const QString &name)
virtual ~SidebarWidgetType ()
const SidebarIconicon () const
const QString & name () const
virtual bool isInReferenceArea () const
virtual bool viewSensitive () const
virtual SidebarContextSensitivity contextSensitivity () const
virtual bool alwaysShowTabs () const
virtual bool hideIfNoContent () const
virtual SidebarIconVisibility defaultIconVisibility () const
virtual SidebarWidgetcreateInvalidContextWidget ()
virtual QWidget * headerWidget (SplitPaneWidget *, ViewFrame *, BinaryViewRef)
virtual bool focusHeaderWidget () const
virtual QString noWidgetMessage () const
virtual DockableTabStyletabStyle () const
virtual bool canUseAsPane (SplitPaneWidget *, BinaryViewRef) const
virtual PanecreatePane (SplitPaneWidget *, BinaryViewRef)
virtual SidebarContentClassifiercontentClassifier (ViewFrame *, BinaryViewRef)
virtual bool deactivateOnLastTabClose () const
void updateTheme ()

Constructor & Destructor Documentation

◆ VariableListSidebarWidgetType()

VariableListSidebarWidgetType::VariableListSidebarWidgetType ( )

Member Function Documentation

◆ createWidget()

virtual SidebarWidget * VariableListSidebarWidgetType::createWidget ( ViewFrame * frame,
BinaryViewRef data )
overridevirtual

Reimplemented from SidebarWidgetType.

◆ defaultLocation()

virtual SidebarWidgetLocation VariableListSidebarWidgetType::defaultLocation ( ) const
inlineoverridevirtual

Reimplemented from SidebarWidgetType.

Enumeration Type Documentation

◆ VariableListItemType

enum class VariableListItemType
strong

A variable list item can represent either a function-local variable, or a data variable referenced by the current function.

Enumerator
LocalVariable 
DataVariable