Ghidra 11.3.2
Ghidra internal decompiler documentation.
Loading...
Searching...
No Matches
ghidra::JumpValues Class Referenceabstract

An iterator over values a switch variable can take. More...

#include <jumptable.hh>

Inheritance diagram for ghidra::JumpValues:
[legend]

Public Member Functions

virtual void truncate (int4 nm)=0
 Truncate the number of values to the given number.
 
virtual uintb getSize (void) const =0
 Return the number of values the variables can take.
 
virtual bool contains (uintb val) const =0
 Return true if the given value is in the set of possible values.
 
virtual bool initializeForReading (void) const =0
 Initialize this for iterating over the set of possible values.
 
virtual bool next (void) const =0
 Advance the iterator, return true if there is another value.
 
virtual uintb getValue (void) const =0
 Get the current value.
 
virtual VarnodegetStartVarnode (void) const =0
 Get the Varnode associated with the current value.
 
virtual PcodeOpgetStartOp (void) const =0
 Get the PcodeOp associated with the current value.
 
virtual bool isReversible (void) const =0
 Return true if the current value can be reversed to get a label.
 
virtual JumpValuesclone (void) const =0
 Clone this iterator.
 

Static Public Attributes

static const uint8 NO_LABEL = 0xBAD1ABE1BAD1ABE1
 Jump-table label reserved to indicate no label.
 

Detailed Description

An iterator over values a switch variable can take.

This iterator is intended to provide the start value for emulation of a jump-table model to obtain the associated jump-table destination. Each value can be associated with a starting Varnode and PcodeOp in the function being emulated, via getStartVarnode() and getStartOp().

Member Function Documentation

◆ clone()

virtual JumpValues * ghidra::JumpValues::clone ( void  ) const
pure virtual

Clone this iterator.

Implemented in ghidra::JumpValuesRange, and ghidra::JumpValuesRangeDefault.

◆ contains()

virtual bool ghidra::JumpValues::contains ( uintb  val) const
pure virtual

Return true if the given value is in the set of possible values.

Implemented in ghidra::JumpValuesRange, and ghidra::JumpValuesRangeDefault.

◆ getSize()

virtual uintb ghidra::JumpValues::getSize ( void  ) const
pure virtual

Return the number of values the variables can take.

Implemented in ghidra::JumpValuesRange, and ghidra::JumpValuesRangeDefault.

◆ getStartOp()

virtual PcodeOp * ghidra::JumpValues::getStartOp ( void  ) const
pure virtual

Get the PcodeOp associated with the current value.

Implemented in ghidra::JumpValuesRange, and ghidra::JumpValuesRangeDefault.

◆ getStartVarnode()

virtual Varnode * ghidra::JumpValues::getStartVarnode ( void  ) const
pure virtual

Get the Varnode associated with the current value.

Implemented in ghidra::JumpValuesRange, and ghidra::JumpValuesRangeDefault.

◆ getValue()

virtual uintb ghidra::JumpValues::getValue ( void  ) const
pure virtual

Get the current value.

Implemented in ghidra::JumpValuesRange.

◆ initializeForReading()

virtual bool ghidra::JumpValues::initializeForReading ( void  ) const
pure virtual

Initialize this for iterating over the set of possible values.

Returns
true if there are any values to iterate over

Implemented in ghidra::JumpValuesRange, and ghidra::JumpValuesRangeDefault.

◆ isReversible()

virtual bool ghidra::JumpValues::isReversible ( void  ) const
pure virtual

Return true if the current value can be reversed to get a label.

Implemented in ghidra::JumpValuesRange, and ghidra::JumpValuesRangeDefault.

◆ next()

virtual bool ghidra::JumpValues::next ( void  ) const
pure virtual

Advance the iterator, return true if there is another value.

Implemented in ghidra::JumpValuesRange, and ghidra::JumpValuesRangeDefault.

◆ truncate()

virtual void ghidra::JumpValues::truncate ( int4  nm)
pure virtual

Truncate the number of values to the given number.

Implemented in ghidra::JumpValuesRange.


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