fast-watchpoints: implementation finished (and tested).
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1900 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
28
src/core/sal/perf/WatchpointBuffer.cc
Normal file
28
src/core/sal/perf/WatchpointBuffer.cc
Normal file
@ -0,0 +1,28 @@
|
||||
#include "WatchpointBuffer.hpp"
|
||||
#include "../Listener.hpp"
|
||||
#include "../Event.hpp"
|
||||
#include "../SALInst.hpp"
|
||||
|
||||
namespace fail {
|
||||
|
||||
// FIXME: Can not be inlined this way!
|
||||
ResultSet& PerfVectorWatchpoints::gather(MemAccessEvent* pData)
|
||||
{
|
||||
static ResultSet res;
|
||||
res.clear(); // FIXME: This should not free the memory of the underlying std::vector.
|
||||
// Search for all indices of matching listener objects:
|
||||
for(std::vector<index_t>::iterator it = m_BufList.begin(); it != m_BufList.end(); ++it) {
|
||||
MemAccessListener* pmal = static_cast<MemAccessListener*>(simulator.dereference(*it));
|
||||
if (pmal->isMatching(pData)) {
|
||||
// Update trigger data:
|
||||
pmal->setTriggerInstructionPointer(pData->getTriggerInstructionPointer());
|
||||
pmal->setTriggerAddress(pData->getTriggerAddress());
|
||||
pmal->setTriggerWidth(pData->getTriggerWidth());
|
||||
pmal->setTriggerAccessType(pData->getTriggerAccessType());
|
||||
res.add(*it);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
} // end-of-namespace: fail
|
||||
Reference in New Issue
Block a user