BochsController.cc is back
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1013 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -1,10 +1,18 @@
|
|||||||
set(SRCS
|
if(BUILD_BOCHS)
|
||||||
Memory.cc
|
set(SRCS
|
||||||
Register.cc
|
Memory.cc
|
||||||
SimulatorController.cc
|
Register.cc
|
||||||
${VARIANT}/Controller.cc
|
SimulatorController.cc
|
||||||
)
|
bochs/BochsController.cc
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(SRCS
|
||||||
|
Memory.cc
|
||||||
|
Register.cc
|
||||||
|
SimulatorController.cc
|
||||||
|
${VARIANT}/Controller.cc
|
||||||
|
)
|
||||||
|
endif(BUILD_BOCHS)
|
||||||
|
|
||||||
|
|
||||||
add_library(SAL ${SRCS})
|
add_library(SAL ${SRCS})
|
||||||
|
|
||||||
|
|||||||
@ -24,33 +24,27 @@ bool hscsimpleExperiment::run()
|
|||||||
// do funny things here...
|
// do funny things here...
|
||||||
#if 1
|
#if 1
|
||||||
// STEP 1
|
// STEP 1
|
||||||
fi::BPEvent mainbp(0x00003c34);
|
//sal::simulator.dbgEnableInstrPtrOutput(500);
|
||||||
sal::simulator.addEventAndWait(&mainbp);
|
while(1){
|
||||||
log << "breakpoint reached, saving" << endl;
|
int j = 0;
|
||||||
sal::simulator.save("hello.state");
|
for(j=0 ; j<=50 ; j++){
|
||||||
|
cout << "durch" << endl;
|
||||||
|
fi::BPEvent mainbp(0x1045f5);
|
||||||
|
//fi::BPEvent mainbp(0x105bfa);
|
||||||
|
sal::simulator.addEventAndWait(&mainbp);
|
||||||
|
}
|
||||||
|
|
||||||
|
int i;
|
||||||
|
for(i=0 ; i<= 0 ; i++){
|
||||||
|
cout << "Interrupt wird ausgeloest" << endl;
|
||||||
|
//sleep(1);
|
||||||
|
sal::simulator.fireInterrupt(9);
|
||||||
|
}
|
||||||
|
}
|
||||||
#elif 1
|
#elif 1
|
||||||
// STEP 2
|
// STEP 2
|
||||||
log << "restoring ..." << endl;
|
sal::simulator.dbgEnableInstrPtrOutput(500);
|
||||||
sal::simulator.restore("hello.state");
|
|
||||||
log << "restored!" << endl;
|
|
||||||
|
|
||||||
log << "waiting for last square() instruction" << endl;
|
|
||||||
fi::BPEvent breakpoint(0x3c9e); // square(x) ret instruction
|
|
||||||
sal::simulator.addEventAndWait(&breakpoint);
|
|
||||||
log << "injecting hellish fault" << endl;
|
|
||||||
#if BX_SUPPORT_X86_64
|
|
||||||
int reg = sal::RID_RAX;
|
|
||||||
#else
|
|
||||||
int reg = sal::RID_EAX;
|
|
||||||
#endif
|
|
||||||
sal::simulator.getRegisterManager().getRegister(reg)->setData(666);
|
|
||||||
log << "waiting for last main() instruction" << endl;
|
|
||||||
breakpoint.setWatchInstructionPointer(0x3c92);
|
|
||||||
sal::simulator.addEventAndWait(&breakpoint);
|
|
||||||
|
|
||||||
log << "reached" << endl;
|
|
||||||
|
|
||||||
sal::simulator.addEventAndWait(&breakpoint);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user