T32: Added BPSingle, central T32 specific api constants
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2106 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -205,7 +205,7 @@ class BPSingleListener : public BPListener {
|
||||
protected:
|
||||
address_t m_WatchInstrPtr;
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* Creates a new breakpoint listener.
|
||||
* @param ip the instruction pointer of the breakpoint. If the control
|
||||
* flow reaches this address and its counter value is zero, the
|
||||
@ -434,7 +434,7 @@ public:
|
||||
bool removeWatchNumber(unsigned troubleNum);
|
||||
/**
|
||||
* Returns the list of observed numbers.
|
||||
* @return a const reference to the list which contains all observed numbers
|
||||
* @return a const reference to the list which contains all observed numbers
|
||||
*/
|
||||
const std::vector<unsigned>& getWatchNumbers() const { return m_WatchNumbers; }
|
||||
/**
|
||||
@ -453,7 +453,7 @@ public:
|
||||
* Sets the specific interrupt-/trap-number that actually triggered
|
||||
* the listener. Should not be used by experiment code.
|
||||
*/
|
||||
void setTriggerNumber(unsigned troubleNum) { m_Data.setTriggerNumber(troubleNum); }
|
||||
void setTriggerNumber(unsigned troubleNum) { m_Data.setTriggerNumber(troubleNum); }
|
||||
/**
|
||||
* Returns the specific interrupt-/trap-number that actually triggered
|
||||
* the listener.
|
||||
|
||||
40
src/core/sal/t32/T32Constants.hpp
Normal file
40
src/core/sal/t32/T32Constants.hpp
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Some constants for the T32 remote api calls.
|
||||
* see also doc/t32_remote_api.pdf
|
||||
*/
|
||||
#ifndef __T32_CONSTANTS_HPP__
|
||||
#define __T32_CONSTANTS_HPP__
|
||||
namespace fail {
|
||||
|
||||
namespace T32 {
|
||||
//!< Breakpoint configuration
|
||||
struct BP {
|
||||
enum {
|
||||
EXECUTION = 1<<0,
|
||||
HLL_STEP = 1<<1,
|
||||
SPOT = 1<<2,
|
||||
READ = 1<<3,
|
||||
WRITE = 1<<4,
|
||||
ALPHA = 1<<5,
|
||||
BETA = 1<<6,
|
||||
CHARLY = 1<<7,
|
||||
CLEAR = 1<<8,
|
||||
};
|
||||
}; // struct BP
|
||||
|
||||
|
||||
//!< Memory access variants
|
||||
struct MEMACCESS {
|
||||
enum {
|
||||
DATA = 0,
|
||||
PROGRAM = 1,
|
||||
AD = 12,
|
||||
AP = 13,
|
||||
USR = 15,
|
||||
};
|
||||
}; // struct MEMACCESS
|
||||
|
||||
}; // namespace T32
|
||||
}; // namespace fail
|
||||
#endif // __T32_CONSTANTS_HPP__
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#if defined(BUILD_T32) && defined(CONFIG_EVENT_BREAKPOINTS)
|
||||
|
||||
#include "../SALInst.hpp"
|
||||
#include "T32Constants.hpp"
|
||||
|
||||
aspect T32Listener
|
||||
{
|
||||
@ -18,13 +19,14 @@ aspect T32Listener
|
||||
// Setup Breakpoint in T32
|
||||
std::cout << "T32Listener::onAddition" << std::endl;
|
||||
// Enable Breakpoint
|
||||
|
||||
T32_WriteBreakpoint( m_WatchInstrPtr, T32::MEMACCESS::PROGRAM, T32::BP::EXECUTION, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
void onDeletion()
|
||||
{
|
||||
// Delete Breakpoint in T32
|
||||
T32_WriteBreakpoint( m_WatchInstrPtr, T32::MEMACCESS::PROGRAM, T32::BP::CLEAR, 1);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
#define __T32_MEMORY_HPP__
|
||||
|
||||
#include "../Memory.hpp"
|
||||
#include <iostream>
|
||||
#include <t32.h>
|
||||
#include "T32Constants.hpp"
|
||||
|
||||
namespace fail {
|
||||
|
||||
@ -14,14 +14,6 @@ namespace fail {
|
||||
*/
|
||||
class T32MemoryManager : public MemoryManager {
|
||||
|
||||
enum ACCESS_CLASS {
|
||||
data_access = 0,
|
||||
program_access = 1,
|
||||
AD_access = 12,
|
||||
AP_access = 13,
|
||||
USR_access = 15,
|
||||
};
|
||||
|
||||
public:
|
||||
size_t getPoolSize() const { return 0; /* TODO */ }
|
||||
|
||||
@ -36,7 +28,7 @@ public:
|
||||
|
||||
void getBytes(guest_address_t addr, size_t cnt, void *dest)
|
||||
{
|
||||
int access = data_access; // TODO what access class do we need?!
|
||||
int access = T32::MEMACCESS::DATA; // TODO what access class do we need?!
|
||||
T32_ReadMemory( addr, access, (byte*)(dest), cnt);
|
||||
}
|
||||
|
||||
@ -47,7 +39,7 @@ public:
|
||||
|
||||
void setBytes(guest_address_t addr, size_t cnt, void const *src)
|
||||
{
|
||||
int access = data_access; // TODO what access class do we really need?!
|
||||
int access = T32::MEMACCESS::DATA; // TODO what access class do we really need?!
|
||||
T32_WriteMemory(addr, access, (byte*)(src), cnt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user