retdec
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
retdec::bin2llvmir::JumpTarget Class Reference

#include <jump_targets.h>

Collaboration diagram for retdec::bin2llvmir::JumpTarget:
Collaboration graph
[legend]

Public Types

enum class  eType {
  CONTROL_FLOW_BR_FALSE = 0 , CONTROL_FLOW_BR_TRUE , CONTROL_FLOW_SWITCH_CASE , CONTROL_FLOW_CALL_TARGET ,
  CONTROL_FLOW_RETURN_TARGET , CONFIG , ENTRY_POINT , SELECTED_RANGE_START ,
  IMPORT , DEBUG , SYMBOL , EXPORT ,
  STATIC_CODE , VTABLE , LEFTOVER , UNKNOWN
}
 

Public Member Functions

 JumpTarget ()
 
 JumpTarget (retdec::common::Address a, eType t, cs_mode m, retdec::common::Address f, std::optional< std::size_t > sz=std::nullopt)
 
bool operator< (const JumpTarget &o) const
 
retdec::common::Address getAddress () const
 
bool hasSize () const
 
std::optional< std::size_t > getSize () const
 
eType getType () const
 
retdec::common::Address getFromAddress () const
 
cs_mode getMode () const
 
void setMode (cs_mode m) const
 

Static Public Attributes

static Configconfig = nullptr
 

Private Attributes

retdec::common::Address _address
 
std::optional< std::size_t > _size
 
eType _type = eType::UNKNOWN
 
retdec::common::Address _fromAddress
 Address from which this jump target was created. More...
 
cs_mode _mode = CS_MODE_BIG_ENDIAN
 Disassembler mode that should be used for this jump target. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const JumpTarget &jt)
 

Detailed Description

Representation of an address that will be tried to be decoded.

Member Enumeration Documentation

◆ eType

Jump target type and its priority. Lower number -> higher priority.

Enumerator
CONTROL_FLOW_BR_FALSE 
CONTROL_FLOW_BR_TRUE 
CONTROL_FLOW_SWITCH_CASE 
CONTROL_FLOW_CALL_TARGET 
CONTROL_FLOW_RETURN_TARGET 
CONFIG 
ENTRY_POINT 
SELECTED_RANGE_START 
IMPORT 
DEBUG 
SYMBOL 
EXPORT 
STATIC_CODE 
VTABLE 
LEFTOVER 
UNKNOWN 

Constructor & Destructor Documentation

◆ JumpTarget() [1/2]

retdec::bin2llvmir::JumpTarget::JumpTarget ( )

◆ JumpTarget() [2/2]

retdec::bin2llvmir::JumpTarget::JumpTarget ( retdec::common::Address  a,
eType  t,
cs_mode  m,
retdec::common::Address  f,
std::optional< std::size_t >  sz = std::nullopt 
)

Member Function Documentation

◆ getAddress()

retdec::common::Address retdec::bin2llvmir::JumpTarget::getAddress ( ) const

◆ getFromAddress()

retdec::common::Address retdec::bin2llvmir::JumpTarget::getFromAddress ( ) const

◆ getMode()

cs_mode retdec::bin2llvmir::JumpTarget::getMode ( ) const

◆ getSize()

std::optional< std::size_t > retdec::bin2llvmir::JumpTarget::getSize ( ) const

◆ getType()

JumpTarget::eType retdec::bin2llvmir::JumpTarget::getType ( ) const

◆ hasSize()

bool retdec::bin2llvmir::JumpTarget::hasSize ( ) const

◆ operator<()

bool retdec::bin2llvmir::JumpTarget::operator< ( const JumpTarget o) const

◆ setMode()

void retdec::bin2llvmir::JumpTarget::setMode ( cs_mode  m) const

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const JumpTarget jt 
)
friend

Member Data Documentation

◆ _address

retdec::common::Address retdec::bin2llvmir::JumpTarget::_address
private

◆ _fromAddress

retdec::common::Address retdec::bin2llvmir::JumpTarget::_fromAddress
private

Address from which this jump target was created.

◆ _mode

cs_mode retdec::bin2llvmir::JumpTarget::_mode = CS_MODE_BIG_ENDIAN
mutableprivate

Disassembler mode that should be used for this jump target.

◆ _size

std::optional<std::size_t> retdec::bin2llvmir::JumpTarget::_size
private

◆ _type

eType retdec::bin2llvmir::JumpTarget::_type = eType::UNKNOWN
private

◆ config

Config * retdec::bin2llvmir::JumpTarget::config = nullptr
static

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