Ghidra Decompiler Analysis Engine
Public Member Functions | Protected Attributes | List of all members
JumpValuesRange Class Reference

single entry switch variable that can take a range of values More...

#include <jumptable.hh>

Inheritance diagram for JumpValuesRange:
Inheritance graph
[legend]
Collaboration diagram for JumpValuesRange:
Collaboration graph
[legend]

Public Member Functions

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

Protected Attributes

CircleRange range
 Acceptable range of values for the normalized switch variable.
 
Varnodenormqvn
 Varnode representing the normalized switch variable.
 
PcodeOpstartop
 First PcodeOp in the jump-table calculation.
 
uintb curval
 The current value pointed to be the iterator.
 

Detailed Description

single entry switch variable that can take a range of values

Member Function Documentation

◆ initializeForReading()

bool JumpValuesRange::initializeForReading ( void  ) const
virtual

Initialize this for iterating over the set of possible values.

Returns
true if there are any values to iterate over

Implements JumpValues.

Reimplemented in JumpValuesRangeDefault.

◆ truncate()

void JumpValuesRange::truncate ( int4  nm)
virtual

The starting value for the range and the step is preserved. The ending value is set so there are exactly the given number of elements in the range.

Parameters
nmis the given number

Implements JumpValues.


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