ROSE
0.11.102.0
|
Definition at line 341 of file NativeSemantics.h.
Public Types | |
using | Super = BaseSemantics::Dispatcher |
Base type. More... | |
using | Ptr = DispatcherPtr |
Shared-ownership pointer. More... | |
![]() | |
using | Ptr = DispatcherPtr |
Shared-ownership pointer. More... | |
Public Member Functions | |
virtual BaseSemantics::DispatcherPtr | create (const BaseSemantics::RiscOperatorsPtr &, size_t addrWidth, const RegisterDictionaryPtr &) const override |
Virtual constructor. More... | |
virtual SgAsmInstruction * | currentInstruction () const override |
Decode the current instruction. More... | |
virtual RegisterDescriptor | instructionPointerRegister () const override |
Returns the instruction pointer register. More... | |
virtual RegisterDescriptor | stackPointerRegister () const override |
Returns the stack pointer register. More... | |
virtual RegisterDescriptor | stackFrameRegister () const override |
Returns the stack call frame register. More... | |
virtual RegisterDescriptor | callReturnRegister () const override |
Returns the function call return address register. More... | |
virtual void | processInstruction (SgAsmInstruction *insn) override |
Process an instruction. More... | |
void | processInstruction (rose_addr_t va) |
Process an instruction. More... | |
virtual void | iprocReplace (SgAsmInstruction *, BaseSemantics::InsnProcessor *) override |
Disabled in this class. | |
virtual void | iprocSet (int, BaseSemantics::InsnProcessor *) override |
Disabled in this class. | |
virtual int | iprocKey (SgAsmInstruction *) const override |
Disabled in this class. | |
![]() | |
virtual InsnProcessor * | iprocLookup (SgAsmInstruction *insn) |
Lookup the processor for an instruction. More... | |
virtual InsnProcessor * | iprocGet (int key) |
Obtain an iproc table entry for the specified key. More... | |
virtual RiscOperatorsPtr | get_operators () const ROSE_DEPRECATED("use \"operators\" instead") |
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 RegisterDictionaryPtr | get_register_dictionary () const |
virtual void | set_register_dictionary (const RegisterDictionaryPtr ®dict) |
virtual RegisterDescriptor | findRegister (const std::string ®name, size_t nbits=0, bool allowMissing=false) const |
Lookup a register by name. More... | |
virtual void | initializeState (const StatePtr &) |
Initialize the state. 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 void | preUpdate (SgAsmExpression *, const BaseSemantics::SValuePtr &enabled) |
Update registers for pre-add expressions. More... | |
virtual void | postUpdate (SgAsmExpression *, const BaseSemantics::SValuePtr &enabled) |
Update registers for post-add expressions. 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 RiscOperatorsPtr | operators () const |
Property: RISC operators. More... | |
virtual void | operators (const RiscOperatorsPtr &ops) |
Property: RISC operators. 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. | |
RegisterDictionaryPtr | registerDictionary () const |
Property: Register dictionary. More... | |
void | registerDictionary (const RegisterDictionaryPtr &rd) |
Property: 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 &, const BaseSemantics::SValuePtr &protoval=SValue::instance()) |
Create a new dispatcher using the specified executable specimen. More... | |
static DispatcherPtr | instance (const BaseSemantics::RiscOperatorsPtr &) |
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 &) | |
![]() | |
Dispatcher (size_t addrWidth, const RegisterDictionaryPtr &) | |
Dispatcher (const RiscOperatorsPtr &, size_t addrWidth, const RegisterDictionaryPtr &) | |
Additional Inherited Members | |
![]() | |
typedef std::vector< InsnProcessor * > | InsnProcessors |
![]() | |
RegisterDictionaryPtr | regdict |
See registerDictionary property. More... | |
size_t | addrWidth_ |
Width of memory addresses in bits. More... | |
bool | autoResetInstructionPointer_ |
Reset instruction pointer register for each instruction. More... | |
InsnProcessors | iproc_table |
using Rose::BinaryAnalysis::InstructionSemantics::NativeSemantics::Dispatcher::Super = BaseSemantics::Dispatcher |
Base type.
Definition at line 344 of file NativeSemantics.h.
Shared-ownership pointer.
Definition at line 347 of file NativeSemantics.h.
|
static |
Create a new dispatcher using the specified process.
|
static |
Create a new dispatcher using the specified executable specimen.
|
static |
Create a new dispatcher using the specified operators.
The operators must derive from NativeSemantics::RiscOperators.
|
overridevirtual |
Virtual constructor.
Implements Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Dispatcher.
|
overridevirtual |
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::InstructionSemantics::BaseSemantics::Dispatcher.
void Rose::BinaryAnalysis::InstructionSemantics::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.
|
overridevirtual |
Decode the current instruction.
Decodes the instruction at the current instruction address.
Reimplemented from Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Dispatcher.
|
overridevirtual |
Returns the instruction pointer register.
Implements Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Dispatcher.
|
overridevirtual |
Returns the stack pointer register.
Implements Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Dispatcher.
|
overridevirtual |
Returns the stack call frame register.
Implements Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Dispatcher.
|
overridevirtual |
Returns the function call return address register.
Implements Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Dispatcher.