ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
A simple logger dedicated to print PC trace. More...
#include <TracePrinter.h>
Public Member Functions | |
TracePrinter (etiss::uint32 terminateAddr, bool printOnScreen=false, char terminateHit=1) | |
~TracePrinter () | |
etiss::int32 | execute () |
called before a block and may act in the same way as a block More... | |
std::string | _getPluginName () const |
void | init (ETISS_CPU *cpu, ETISS_System *system, etiss::CPUArch *arch) |
this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute). More... | |
void | cleanup () |
this function is called after cpu execution loop (etiss::CPUCore::execute) finished. More... | |
Public Member Functions inherited from etiss::CoroutinePlugin | |
CoroutinePlugin () | |
virtual | ~CoroutinePlugin () |
virtual void | executionEnd (int32_t code) |
called when the simulation ends but before any deinitialization is done More... | |
virtual bool | isActive () |
indicates if the plugin will do something in execution loop. More... | |
Public Member Functions inherited from etiss::Plugin | |
virtual | ~Plugin () |
unsigned | getType () |
InterruptListenerPlugin * | getInterruptListenerPlugin () |
CoroutinePlugin * | getCoroutinePlugin () |
SystemWrapperPlugin * | getSystemWrapperPlugin () |
RegisterDevicePlugin * | getRegisterDevicePlugin () |
TranslationPlugin * | getTranslationPlugin () |
std::string | getPluginName () const |
const std::string & | getLastAssignedCoreName () |
std::string | toString () const |
Public Member Functions inherited from etiss::ToString | |
ToString () | |
virtual | ~ToString () |
Private Member Functions | |
void | printLog () |
Private Attributes | |
ETISS_CPU * | cpu_ |
ETISS_System * | system_ |
etiss::CPUArch * | arch_ |
std::stringstream | pcTrace_ |
char | hitTimes_ = 0 |
bool | printOnScreen_ |
const etiss::uint32 | terminateAddr_ |
const char | terminateHit_ |
Additional Inherited Members | |
Static Public Attributes inherited from etiss::Plugin | |
static const unsigned | INTERRUPTLISTENER = 1 << 0 |
access to translated code More... | |
static const unsigned | COROUTINE = 1 << 1 |
callback after execution of each translated block More... | |
static const unsigned | SYSTEMWRAPPER = 1 << 2 |
can wrap/change ETISS_System structure at execution start More... | |
static const unsigned | REGISTERDEVICE |
gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture]) More... | |
static const unsigned | TRANSLATION |
access to translated code during translation phase or when instruction tree is built More... | |
Protected Member Functions inherited from etiss::Plugin | |
Plugin (unsigned type=0) | |
void | setCorrespondingCPUCoreName (std::string name) |
virtual void | addedToCPUCore (etiss::CPUCore *core) |
called as soon a plugin has been added to its CPUCore. More... | |
virtual void | removedFromCPUCore (etiss::CPUCore *core) |
called as soon a plugin has been removed from its CPUCore. More... | |
Protected Attributes inherited from etiss::Plugin | |
ETISS_CPU * | plugin_cpu_ |
holds a pointer to the cpu structure. will be set before init call and after cleanup call More... | |
ETISS_System * | plugin_system_ |
holds a pointer to the system structure. More... | |
CPUArch * | plugin_arch_ |
holds a pointer to the CPUArch instance. will be set before init call and after cleanup call More... | |
CPUCore * | plugin_core_ |
holds a pointer to the associated CPUCore instance. More... | |
A simple logger dedicated to print PC trace.
Most accurate when etiss.max_block_size in ETISS.ini is set to 1.
terminateAddr | Terminate simulation when hit certain address |
[Optional] | printOnScreen: Print PC on screen if true |
[Optional] | terminateAddr:Terminate simulation only when hit the address *terminateHit* times. |
Definition at line 60 of file TracePrinter.h.
|
inline |
Definition at line 64 of file TracePrinter.h.
|
inline |
Definition at line 70 of file TracePrinter.h.
References printLog().
|
inlinevirtual |
Implements etiss::Plugin.
Definition at line 89 of file TracePrinter.h.
|
inlinevirtual |
this function is called after cpu execution loop (etiss::CPUCore::execute) finished.
Only the SystemWrapperPlugin::unwrap function is called AFTER Plugin::cleanup
Reimplemented from etiss::Plugin.
Definition at line 98 of file TracePrinter.h.
|
inlinevirtual |
called before a block and may act in the same way as a block
Implements etiss::CoroutinePlugin.
Definition at line 72 of file TracePrinter.h.
References cpu_, hitTimes_, ETISS_CPU::instructionPointer, etiss::mm::NOERROR, pcTrace_, printLog(), printOnScreen_, terminateAddr_, and terminateHit_.
|
inlinevirtual |
this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute).
Only exception is the SystemWrapperPlugin whose SystemWrapperPlugin::wrap function is called BEFORE Plugin::init
Reimplemented from etiss::Plugin.
Definition at line 91 of file TracePrinter.h.
|
inlineprivate |
Definition at line 116 of file TracePrinter.h.
References pcTrace_.
Referenced by execute(), and ~TracePrinter().
|
private |
Definition at line 108 of file TracePrinter.h.
|
private |
Definition at line 106 of file TracePrinter.h.
|
private |
Definition at line 111 of file TracePrinter.h.
Referenced by execute().
|
private |
Definition at line 110 of file TracePrinter.h.
Referenced by execute(), and printLog().
|
private |
Definition at line 112 of file TracePrinter.h.
Referenced by execute().
|
private |
Definition at line 107 of file TracePrinter.h.
|
private |
Definition at line 113 of file TracePrinter.h.
Referenced by execute().
|
private |
Definition at line 114 of file TracePrinter.h.
Referenced by execute().