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:
hoffmann
2013-02-16 23:05:07 +00:00
parent 6761268d93
commit 205c7ec919
4 changed files with 35 additions and 29 deletions

View File

@ -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();
}