ROSE  0.10.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher Class Reference

Description

Definition at line 348 of file NativeSemantics.h.

Inheritance diagram for Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher:
Collaboration graph
[legend]

Public Member Functions

virtual BaseSemantics::DispatcherPtr create (const BaseSemantics::RiscOperatorsPtr &ops, size_t addrWidth=0, const RegisterDictionary *regs=NULL) const ROSE_OVERRIDE
 Virtual constructor. More...
 
virtual SgAsmInstructioncurrentInstruction () const ROSE_OVERRIDE
 Decode the current instruction. More...
 
virtual RegisterDescriptor instructionPointerRegister () const ROSE_OVERRIDE
 Returns the instruction pointer register. More...
 
virtual RegisterDescriptor stackPointerRegister () const ROSE_OVERRIDE
 Returns the stack pointer register. More...
 
virtual RegisterDescriptor callReturnRegister () const ROSE_OVERRIDE
 Returns the function call return address register. More...
 
virtual void processInstruction (SgAsmInstruction *insn) ROSE_OVERRIDE
 Process an instruction. More...
 
void processInstruction (rose_addr_t va)
 Process an instruction. More...
 
virtual void iproc_replace (SgAsmInstruction *, BaseSemantics::InsnProcessor *) ROSE_OVERRIDE
 Disabled in this class.
 
virtual void iproc_set (int key, BaseSemantics::InsnProcessor *) ROSE_OVERRIDE
 Disabled in this class.
 
virtual int iproc_key (SgAsmInstruction *) const ROSE_OVERRIDE
 Disabled in this class.
 
- Public Member Functions inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher
virtual InsnProcessoriproc_lookup (SgAsmInstruction *insn)
 Lookup the processor for an instruction. More...
 
virtual InsnProcessoriproc_get (int key)
 Obtain an iproc table entry for the specified key. More...
 
virtual RiscOperatorsPtr get_operators () const
 Get a pointer to the RISC operators object. More...
 
virtual StatePtr currentState () const
 Get a pointer to the state object. More...
 
virtual SValuePtr protoval () const
 Return the prototypical value. More...
 
virtual SValuePtr number_ (size_t nbits, uint64_t number) const
 Return a semantic value representing a number. More...
 
virtual RegisterDescriptor findRegister (const std::string &regname, size_t nbits=0, bool allowMissing=false) const
 Lookup a register by name. More...
 
virtual void advanceInstructionPointer (SgAsmInstruction *)
 Update the instruction pointer register. More...
 
virtual RegisterDescriptor segmentRegister (SgAsmMemoryReferenceExpression *)
 Returns a register descriptor for the segment part of a memory reference expression. More...
 
virtual void incrementRegisters (SgAsmExpression *)
 Increment all auto-increment registers in the expression. More...
 
virtual void decrementRegisters (SgAsmExpression *)
 Decrement all auto-decrement registers in the expression. More...
 
virtual SValuePtr effectiveAddress (SgAsmExpression *, size_t nbits=0)
 Returns a memory address by evaluating the address expression. More...
 
virtual SValuePtr read (SgAsmExpression *, size_t value_nbits=0, size_t addr_nbits=0)
 Reads an R-value expression. More...
 
virtual void write (SgAsmExpression *, const SValuePtr &value, size_t addr_nbits=0)
 Writes to an L-value expression. More...
 
virtual SValuePtr undefined_ (size_t nbits) const
 Return a new undefined semantic value.
 
virtual SValuePtr unspecified_ (size_t nbits) const
 Return a new undefined semantic value.
 
virtual const RegisterDictionaryget_register_dictionary () const
 Access the register dictionary. More...
 
virtual void set_register_dictionary (const RegisterDictionary *regdict)
 Access the register dictionary. More...
 
size_t addressWidth () const
 Property: Width of memory addresses. More...
 
void addressWidth (size_t nbits)
 Property: Width of memory addresses. More...
 
bool autoResetInstructionPointer () const
 Property: Reset instruction pointer register for each instruction. More...
 
void autoResetInstructionPointer (bool b)
 Property: Reset instruction pointer register for each instruction. More...
 

Static Public Member Functions

static DispatcherPtr instance (const Debugger::Ptr &process, const BaseSemantics::SValuePtr &protoval=SValue::instance())
 Create a new dispatcher using the specified process. More...
 
static DispatcherPtr instance (const Debugger::Specimen &specimen, const BaseSemantics::SValuePtr &protoval=SValue::instance())
 Create a new dispatcher using the specified executable specimen. More...
 
static DispatcherPtr instance (const BaseSemantics::RiscOperatorsPtr &ops)
 Create a new dispatcher using the specified operators. More...
 

Protected Member Functions

 Dispatcher (const Debugger::Ptr &process, const BaseSemantics::SValuePtr &protoval)
 
 Dispatcher (const BaseSemantics::RiscOperatorsPtr &ops)
 
- Protected Member Functions inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher
 Dispatcher (size_t addrWidth, const RegisterDictionary *regs)
 
 Dispatcher (const RiscOperatorsPtr &ops, size_t addrWidth, const RegisterDictionary *regs)
 

Additional Inherited Members

- Public Types inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher
typedef DispatcherPtr Ptr
 Shared-ownership pointer for a Dispatcher object. More...
 
- Protected Types inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher
typedef std::vector< InsnProcessor * > InsnProcessors
 
- Protected Attributes inherited from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher
RiscOperatorsPtr operators
 
const RegisterDictionaryregdict
 See set_register_dictionary(). More...
 
size_t addrWidth_
 Width of memory addresses in bits. More...
 
bool autoResetInstructionPointer_
 Reset instruction pointer register for each instruction. More...
 
InsnProcessors iproc_table
 

Member Function Documentation

static DispatcherPtr Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::instance ( const Debugger::Ptr process,
const BaseSemantics::SValuePtr protoval = SValue::instance() 
)
inlinestatic

Create a new dispatcher using the specified process.

Definition at line 374 of file NativeSemantics.h.

static DispatcherPtr Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::instance ( const Debugger::Specimen specimen,
const BaseSemantics::SValuePtr protoval = SValue::instance() 
)
inlinestatic

Create a new dispatcher using the specified executable specimen.

Definition at line 380 of file NativeSemantics.h.

References Rose::BinaryAnalysis::Debugger::instance().

static DispatcherPtr Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::instance ( const BaseSemantics::RiscOperatorsPtr ops)
inlinestatic

Create a new dispatcher using the specified operators.

The operators must derive from NativeSemantics::RiscOperators.

Definition at line 389 of file NativeSemantics.h.

References Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::RiscOperators::promote().

virtual BaseSemantics::DispatcherPtr Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::create ( const BaseSemantics::RiscOperatorsPtr ops,
size_t  addrWidth = 0,
const RegisterDictionary regs = NULL 
) const
inlinevirtual

Virtual constructor.

Implements Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher.

Definition at line 399 of file NativeSemantics.h.

virtual void Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::processInstruction ( SgAsmInstruction insn)
virtual

Process an instruction.

Since the instruction must be executed in the subordinate process, the insn argument serves only to supply the address of the native instruction. The instruction is executed by writing the supplied insn address to the subordinate's instruction pointer register and then single-stepping the subordinate to execute whatever instruction appears at that address.

Reimplemented from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher.

void Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::processInstruction ( rose_addr_t  va)

Process an instruction.

Since the instruction must be executed in the subordinate process, the insn argument serves only to supply the address of the native instruction. The instruction is executed by writing the supplied insn address to the subordinate's instruction pointer register and then single-stepping the subordinate to execute whatever instruction appears at that address.

virtual SgAsmInstruction* Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::currentInstruction ( ) const
virtual

Decode the current instruction.

Decodes the instruction at the current instruction address.

Reimplemented from Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher.

virtual RegisterDescriptor Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::instructionPointerRegister ( ) const
virtual

Returns the instruction pointer register.

Implements Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher.

virtual RegisterDescriptor Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::stackPointerRegister ( ) const
virtual

Returns the stack pointer register.

Implements Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher.

virtual RegisterDescriptor Rose::BinaryAnalysis::InstructionSemantics2::NativeSemantics::Dispatcher::callReturnRegister ( ) const
virtual

Returns the function call return address register.

Implements Rose::BinaryAnalysis::InstructionSemantics2::BaseSemantics::Dispatcher.


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