decompiler  1.0.0
Public Member Functions | List of all members
ghidra::JumpValues Class Referenceabstract

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

#include <jumptable.hh>

Inheritance diagram for ghidra::JumpValues:
ghidra::JumpValuesRange ghidra::JumpValuesRangeDefault

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. More...
 
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.
 

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

◆ 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::JumpValuesRangeDefault, and ghidra::JumpValuesRange.


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