From 5eeda5a2a6173e1d3e011a98c4866fa4700a9212 Mon Sep 17 00:00:00 2001 From: sirozipp Date: Sat, 5 May 2012 07:59:02 +0000 Subject: [PATCH] OVP_SAL: save/restore added git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1207 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- core/SAL/ovp/Controller.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/SAL/ovp/Controller.cc b/core/SAL/ovp/Controller.cc index 0325a42a..7813dd44 100644 --- a/core/SAL/ovp/Controller.cc +++ b/core/SAL/ovp/Controller.cc @@ -68,8 +68,14 @@ void OVPController::onInstrPtrChanged(address_t instrPtr) OVPStatusRegister *rid_st = (OVPStatusRegister *) m_Regs->getSetOfType(RT_GP)->first(); // cerr << "Addr: " << rid_st << endl; unsigned int st = rid_st->getData(); + + //save("/srv/scratch/sirozipp/test.txt"); + + //ovpplatform.setPC(0x123); + + //restore("/srv/scratch/sirozipp/test.txt"); // cerr << "instrPtr: 0x" << hex << instrPtr << " SP: 0x" << hex << m_Regs->getStackPointer() \ - << " R0: 0x" << hex << r0 << " ST: 0x" << hex << st << endl; +// << " R0: 0x" << hex << r0 << " ST: 0x" << hex << st << endl; // Check for active breakpoint-events: fi::EventList::iterator it = m_EvList.begin(); @@ -104,6 +110,7 @@ void OVPController::save(const string& path) //TODO //SIM->save_state(path.c_str()); //bx_gui_c::power_handler(); + ovpplatform.save(path); } void OVPController::restore(const string& path) @@ -113,6 +120,7 @@ void OVPController::restore(const string& path) assert(path.length() > 0 && "FATAL ERROR: Tried to restore state without valid path!"); //strncpy(bx_pc_system.sr_path, path.c_str(), 512 /*CI_PATH_LENGTH, @see gui/textconfig.cc*/); + ovpplatform.restore(path); } void OVPController::reboot()