Namespaces unified (sal+fi -> fail), Code cleanups (-> coding-style.txt), Doxygen-comments fixed.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1319 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-06-07 17:47:19 +00:00
parent cdd5379e19
commit b7d904140e
136 changed files with 1487 additions and 1554 deletions

View File

@ -1,10 +1,11 @@
#include <iostream>
#include "OVPController.hpp"
#include "OVPMemory.hpp"
#include "OVPRegister.hpp"
#include "../../../ovp/OVPStatusRegister.hpp"
namespace sal {
namespace fail {
OVPController::OVPController()
: SimulatorController(new OVPRegisterManager(), new OVPMemoryManager())
@ -78,14 +79,14 @@ void OVPController::onInstrPtrChanged(address_t instrPtr)
// << " R0: 0x" << hex << r0 << " ST: 0x" << hex << st << endl;
// Check for active breakpoint-events:
fi::EventList::iterator it = m_EvList.begin();
EventList::iterator it = m_EvList.begin();
while(it != m_EvList.end())
{
// FIXME: Performance verbessern (dazu muss entsprechend auch die Speicherung
// in EventList(.cc|.hpp) angepasst bzw. verbessert werden).
fi::BPSingleEvent* pEvBreakpt = dynamic_cast<fi::BPSingleEvent*>(*it);
BPSingleEvent* pEvBreakpt = dynamic_cast<BPSingleEvent*>(*it);
if(pEvBreakpt && (instrPtr == pEvBreakpt->getWatchInstructionPointer() ||
pEvBreakpt->getWatchInstructionPointer() == fi::ANY_ADDR))
pEvBreakpt->getWatchInstructionPointer() == ANY_ADDR))
{
pEvBreakpt->setTriggerInstructionPointer(instrPtr);
it = m_EvList.makeActive(it);
@ -93,7 +94,7 @@ void OVPController::onInstrPtrChanged(address_t instrPtr)
// makeActive()):
continue; // -> skip iterator increment
}
fi::BPRangeEvent* pEvRange = dynamic_cast<fi::BPRangeEvent*>(*it);
BPRangeEvent* pEvRange = dynamic_cast<BPRangeEvent*>(*it);
if(pEvRange && pEvRange->isMatching(instrPtr))
{
pEvBreakpt->setTriggerInstructionPointer(instrPtr);
@ -130,4 +131,4 @@ void OVPController::reboot()
//bx_gui_c::reset_handler();//TODO: leider protected, so geht das also nicht...
}
};
}

View File

@ -4,15 +4,13 @@
// Type definitions and configuration settings for
// the OVP simulator.
namespace sal
{
namespace fail {
typedef uint32_t guest_address_t; //!< the guest memory address type
typedef uint8_t* host_address_t; //!< the host memory address type
typedef uint32_t register_data_t; //!< register data type (32 bit)
typedef int timer_t; //!< type of timer IDs
};
#endif /* __OVP_CONFIG_HPP__ */
}
#endif // __OVP_CONFIG_HPP__

View File

@ -8,18 +8,12 @@
#include "../SimulatorController.hpp"
#include "../../controller/Event.hpp"
#include "../../../ovp/OVPPlatform.hpp"
#include "../Register.hpp"
using namespace std;
extern OVPPlatform ovpplatform;
/// Simulator Abstraction Layer namespace
namespace sal
{
namespace fail {
/**
* \class OVPController
@ -46,12 +40,12 @@ class OVPController : public SimulatorController
* Save simulator state.
* @param path Location to store state information
*/
virtual void save(const string& path);
virtual void save(const std::string& path);
/**
* Restore simulator state.
* @param path Location to previously saved state information
*/
virtual void restore(const string& path);
virtual void restore(const std::string& path);
/**
* Reboot simulator.
*/
@ -60,10 +54,9 @@ class OVPController : public SimulatorController
* Returns the current instruction pointer.
* @return the current eip
*/
void makeGPRegister(int, void*, const string&);
void makeSTRegister(Register *, const string&);
void makePCRegister(int, void*, const string&);
void makeGPRegister(int, void*, const std::string&);
void makeSTRegister(Register *, const std::string&);
void makePCRegister(int, void*, const std::string&);
//DELETE-ME:This should be obsolete now...
/**
@ -71,8 +64,8 @@ class OVPController : public SimulatorController
* must tell OVPController when it is finished
*/
//void finishedRegisterCreation();
};
};
#endif
}
#endif // __OVP_CONTROLLER_HPP__

View File

@ -3,8 +3,7 @@
#include "../Memory.hpp"
namespace sal
{
namespace fail {
/**
* \class OVPMemoryManager
@ -90,4 +89,4 @@ class OVPMemoryManager : public MemoryManager
}
#endif
#endif // __OVP_MEMORY_HPP__

View File

@ -7,7 +7,7 @@
extern OVPPlatform ovpplatform;
namespace sal {
namespace fail {
/**
* \class OVPRegister
@ -74,7 +74,8 @@ class OVPRegisterManager : public RegisterManager
{
return 0;
}
};
}
#endif
#endif // __OVP_REGISTER_HPP__

View File

@ -4,9 +4,10 @@
#include "../SALInst.hpp"
aspect OVPInit {
advice call("% ...::startSimulation(...)") : before () {
cout << "OVP init aspect!" << endl;
sal::simulator.startup();
advice call("% ...::startSimulation(...)") : before ()
{
std::cout << "OVP init aspect!" << std::endl;
fail::simulator.startup();
}
};