T32: Breakpoint test code
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2107 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -24,7 +24,7 @@ bool VEZSExperiment::run()
|
||||
{
|
||||
m_log << "STARTING EXPERIMENT" << endl;
|
||||
m_log << "Instruction Pointer: 0x" << hex << simulator.getCPU(0).getInstructionPointer() << endl;
|
||||
|
||||
// Test register access
|
||||
Register* reg = simulator.getCPU(0).getRegister(RI_R1);
|
||||
m_log << "Register R2: 0x" << hex << simulator.getCPU(0).getRegisterContent(reg) << endl;
|
||||
|
||||
@ -33,6 +33,7 @@ bool VEZSExperiment::run()
|
||||
|
||||
simulator.getCPU(0).setRegisterContent(reg, 0x23);
|
||||
|
||||
// Test Memory access
|
||||
address_t targetaddress = 0x12345678;
|
||||
MemoryManager& mm = simulator.getMemoryManager();
|
||||
mm.setByte(targetaddress, 0x42);
|
||||
@ -44,6 +45,16 @@ bool VEZSExperiment::run()
|
||||
// read back bytes
|
||||
mm.getBytes(targetaddress, 4, tb);
|
||||
|
||||
// Test Breakpoints
|
||||
address_t address = 0x11223344;
|
||||
BPSingleListener bp(address);
|
||||
simulator.addListener(&bp);
|
||||
|
||||
simulator.clearListeners();
|
||||
|
||||
// resume backend.
|
||||
simulator.resume();
|
||||
|
||||
// Explicitly terminate, or the simulator will continue to run.
|
||||
simulator.terminate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user