ROSE 0.11.145.147
|
A semantics domain wrapper that prints and checks all RISC operators as they occur.
This semantics domain provides only a RiscOperators class, which chains most methods to a subdomain specified either with its constructor or via set_subdomain(). In order to add tracing to any domain, simply wrap that domain's RiscOperators object inside a TraceSemantics' RiscOperators:
When an instruction is processed, it will emit traces on standard output (by default; see set_stream()). The messages look something like this (the exact format depends on the subdomain being traced):
The TraceSemantics also checks for problems with operand and return value widths and reports them in the output also. Tracing can be turned off either by specifying a NULL file pointer for set_stream(), or by unwrapping the subdomain's RISC operators, something along these lines:
Classes | |
class | RiscOperators |
Wraps RISC operators so they can be traced. More... | |
Typedefs | |
typedef void | SValue |
typedef boost::shared_ptr< void > | SValuePtr |
Shared-ownership pointer to trace-semantics values. | |
typedef void | RegisterState |
typedef boost::shared_ptr< void > | RegisterStatePtr |
Shared-ownership pointer to trace-semantics register state. | |
typedef void | MemoryState |
typedef boost::shared_ptr< void > | MemoryStatePtr |
Shared-ownership pointer to trace-semantics memory state. | |
typedef boost::shared_ptr< class RiscOperators > | RiscOperatorsPtr |
Shared-ownership pointer to trace-semantics RISC operations. | |
typedef void Rose::BinaryAnalysis::InstructionSemantics::TraceSemantics::SValue |
Definition at line 60 of file TraceSemantics.h.
typedef boost::shared_ptr<void> Rose::BinaryAnalysis::InstructionSemantics::TraceSemantics::SValuePtr |
Shared-ownership pointer to trace-semantics values.
Definition at line 63 of file TraceSemantics.h.
typedef void Rose::BinaryAnalysis::InstructionSemantics::TraceSemantics::RegisterState |
Definition at line 70 of file TraceSemantics.h.
typedef boost::shared_ptr<void> Rose::BinaryAnalysis::InstructionSemantics::TraceSemantics::RegisterStatePtr |
Shared-ownership pointer to trace-semantics register state.
Definition at line 73 of file TraceSemantics.h.
typedef void Rose::BinaryAnalysis::InstructionSemantics::TraceSemantics::MemoryState |
Definition at line 80 of file TraceSemantics.h.
typedef boost::shared_ptr<void> Rose::BinaryAnalysis::InstructionSemantics::TraceSemantics::MemoryStatePtr |
Shared-ownership pointer to trace-semantics memory state.
Definition at line 83 of file TraceSemantics.h.
typedef boost::shared_ptr<class RiscOperators> Rose::BinaryAnalysis::InstructionSemantics::TraceSemantics::RiscOperatorsPtr |
Shared-ownership pointer to trace-semantics RISC operations.
Definition at line 91 of file TraceSemantics.h.