From 619f62b09f29796227992c8f9eefc5759098192b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20B=C3=B6ckenkamp?= Date: Wed, 24 Apr 2013 14:14:15 +0200 Subject: [PATCH] gem5: added getMnemonic() (requires breakpoints) Change-Id: I5a2862a0ad3c3d506189a6196682e227205ebe09 --- src/core/sal/gem5/Gem5Controller.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/core/sal/gem5/Gem5Controller.hpp b/src/core/sal/gem5/Gem5Controller.hpp index c4c664f0..70bdf38a 100644 --- a/src/core/sal/gem5/Gem5Controller.hpp +++ b/src/core/sal/gem5/Gem5Controller.hpp @@ -1,6 +1,9 @@ #ifndef __GEM5_CONTROLLER_HPP__ #define __GEM5_CONTROLLER_HPP__ +#include + +#include "config/FailConfig.hpp" #include "../SimulatorController.hpp" #include "Gem5Memory.hpp" @@ -13,10 +16,16 @@ namespace fail { * \class Gem5Controller * * Gem5-specific implementation of a SimulatorController. + * + * \todo setRegisterContent() does not work with the program counter (RI_IP). */ class Gem5Controller : public SimulatorController { private: System* m_System; //!< the gem5 system object +#if defined(CONFIG_EVENT_BREAKPOINTS) ||\ + defined(CONFIG_EVENT_BREAKPOINTS_RANGE) + std::string m_Mnemonic; //!< mnemonic of the instr. (only with BPs) +#endif public: void startup(); ~Gem5Controller(); @@ -24,6 +33,11 @@ public: bool save(const std::string &path); void restore(const std::string &path); void reboot(); +#if defined(CONFIG_EVENT_BREAKPOINTS) ||\ + defined(CONFIG_EVENT_BREAKPOINTS_RANGE) + void setMnemonic(const std::string& mn) { m_Mnemonic = mn; } + const std::string& getMnemonic() const { return m_Mnemonic; } +#endif }; } // end-of-namespace: fail