Dyninst::MachRegister Class Reference

#include <dyn_regs.h>

Public Member Functions

 MachRegister ()
 MachRegister (signed int r)
 MachRegister (signed int r, const char *n)
 MachRegister (signed int r, std::string n)
MachRegister getBaseRegister () const
Architecture getArchitecture () const
bool isValid () const
MachRegisterVal getSubRegValue (const MachRegister &subreg, MachRegisterVal &orig) const
std::string name () const
unsigned int size () const
bool operator< (const MachRegister &a) const
bool operator== (const MachRegister &a) const
 operator signed int () const
signed int val () const
unsigned int regClass () const
bool isPC () const
bool isFramePointer () const
bool isStackPointer () const
void getROSERegister (int &c, int &n, int &p)
int getDwarfEnc () const

Static Public Member Functions

static MachRegister getPC (Dyninst::Architecture arch)
static MachRegister getFramePointer (Dyninst::Architecture arch)
static MachRegister getStackPointer (Dyninst::Architecture arch)
static MachRegister DwarfEncToReg (int encoding, Dyninst::Architecture arch)

Private Types

typedef std::map< signed int,
std::string > 
NameMap

Private Member Functions

void init_names ()

Static Private Member Functions

static boost::shared_ptr
< MachRegister::NameMap
names ()

Private Attributes

signed int reg

Friends

struct ::Dyninst::x86OperandParser
struct ::Dyninst::ppcOperandParser

Detailed Description

Definition at line 60 of file dyn_regs.h.


Member Typedef Documentation

typedef std::map<signed int, std::string> Dyninst::MachRegister::NameMap [private]

Definition at line 66 of file dyn_regs.h.


Constructor & Destructor Documentation

MachRegister::MachRegister (  ) 

Definition at line 48 of file dyn_regs.C.

Referenced by getBaseRegister().

MachRegister::MachRegister ( signed int  r  )  [explicit]

Definition at line 53 of file dyn_regs.C.

MachRegister::MachRegister ( signed int  r,
const char *  n 
) [explicit]

Definition at line 58 of file dyn_regs.C.

References names().

MachRegister::MachRegister ( signed int  r,
std::string  n 
) [explicit]

Definition at line 64 of file dyn_regs.C.

References names().


Member Function Documentation

MachRegister MachRegister::DwarfEncToReg ( int  encoding,
Dyninst::Architecture  arch 
) [static]
Architecture MachRegister::getArchitecture (  )  const
MachRegister MachRegister::getBaseRegister (  )  const
int MachRegister::getDwarfEnc (  )  const
MachRegister MachRegister::getFramePointer ( Dyninst::Architecture  arch  )  [static]
MachRegister MachRegister::getPC ( Dyninst::Architecture  arch  )  [static]
void MachRegister::getROSERegister ( int &  c,
int &  n,
int &  p 
)

Definition at line 279 of file dyn_regs.C.

References Dyninst::x86::AF, Dyninst::Arch_ppc32, Dyninst::Arch_ppc64, Dyninst::Arch_x86, Dyninst::Arch_x86_64, Dyninst::x86::BASEA, Dyninst::x86::BASEB, Dyninst::x86::BASEBP, Dyninst::x86::BASEC, Dyninst::x86::BASED, Dyninst::x86::BASEDI, Dyninst::x86::BASESI, Dyninst::x86::BASESP, Dyninst::x86::BIT, Dyninst::x86::CF, Dyninst::x86::CTL, Dyninst::x86_64::D_REG, Dyninst::x86::DBG, Dyninst::x86::DF, Dyninst::x86::FLAG, Dyninst::x86::FPDBL, Dyninst::ppc32::FPR, Dyninst::ppc32::FSR, Dyninst::x86::FULL, getArchitecture(), Dyninst::ppc32::GPR, Dyninst::x86::GPR, Dyninst::x86::H_REG, Dyninst::x86::IF, Dyninst::x86::L_REG, Dyninst::x86::MISC, Dyninst::x86::MMX, Dyninst::x86::OCT, Dyninst::x86::OF, Dyninst::x86::PF, powerpc_condreggranularity_field, powerpc_condreggranularity_whole, powerpc_regclass_cr, powerpc_regclass_fpr, powerpc_regclass_gpr, powerpc_regclass_spr, powerpc_regclass_sr, reg, Dyninst::x86::SEG, Dyninst::x86::SF, Dyninst::ppc32::SPR, Dyninst::x86::TF, Dyninst::x86::TST, Dyninst::x86::W_REG, x86_flag_af, x86_flag_cf, x86_flag_df, x86_flag_if, x86_flag_of, x86_flag_pf, x86_flag_sf, x86_flag_tf, x86_flag_zf, x86_gpr_ax, x86_gpr_bp, x86_gpr_bx, x86_gpr_cx, x86_gpr_di, x86_gpr_dx, x86_gpr_si, x86_gpr_sp, x86_regclass_cr, x86_regclass_dr, x86_regclass_flags, x86_regclass_gpr, x86_regclass_ip, x86_regclass_mm, x86_regclass_segment, x86_regclass_unknown, x86_regclass_xmm, x86_regpos_all, x86_regpos_dword, x86_regpos_high_byte, x86_regpos_low_byte, x86_regpos_unknown, x86_regpos_word, x86_segreg_cs, x86_segreg_ds, x86_segreg_es, x86_segreg_fs, x86_segreg_gs, x86_segreg_ss, Dyninst::x86::XMM, and Dyninst::x86::ZF.

MachRegister MachRegister::getStackPointer ( Dyninst::Architecture  arch  )  [static]
MachRegisterVal MachRegister::getSubRegValue ( const MachRegister subreg,
MachRegisterVal orig 
) const
void Dyninst::MachRegister::init_names (  )  [private]
bool MachRegister::isFramePointer (  )  const

Definition at line 262 of file dyn_regs.C.

bool MachRegister::isPC (  )  const

Definition at line 256 of file dyn_regs.C.

Referenced by Dyninst::x86OperandParser::createRegisterNames().

bool MachRegister::isStackPointer (  )  const

Definition at line 268 of file dyn_regs.C.

bool MachRegister::isValid (  )  const

Definition at line 95 of file dyn_regs.C.

References reg.

std::string MachRegister::name (  )  const
boost::shared_ptr< MachRegister::NameMap > MachRegister::names (  )  [static, private]
MachRegister::operator signed int (  )  const

Definition at line 193 of file dyn_regs.C.

References reg.

bool MachRegister::operator< ( const MachRegister a  )  const

Definition at line 185 of file dyn_regs.C.

References reg.

bool MachRegister::operator== ( const MachRegister a  )  const

Definition at line 189 of file dyn_regs.C.

References reg.

unsigned int MachRegister::regClass (  )  const
unsigned int MachRegister::size (  )  const
signed int MachRegister::val (  )  const

Definition at line 197 of file dyn_regs.C.

References reg.

Referenced by getDwarfEnc().


Friends And Related Function Documentation

friend struct ::Dyninst::ppcOperandParser [friend]

Definition at line 62 of file dyn_regs.h.

friend struct ::Dyninst::x86OperandParser [friend]

Definition at line 61 of file dyn_regs.h.


Field Documentation

signed int Dyninst::MachRegister::reg [private]

The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1