core/sal: allow repeating BochsController::save
BochsController::save() now can in principle be called multiple times in a row. Not that this would really make sense, but the results are consistent now. Change-Id: Ib4c6eb571a364b0f7ea6142c8cfec004a12f98b3
This commit is contained in:
@ -19,13 +19,14 @@ aspect SaveState {
|
||||
advice execution (cpuLoop()) : order ("SaveState", "Breakpoints");
|
||||
|
||||
advice execution (cpuLoop()) : after () {
|
||||
if (!fail::save_bochs_request)
|
||||
return;
|
||||
assert(fail::sr_path.size() > 0 && "FATAL ERROR: tried to save state without valid path");
|
||||
SIM->save_state(fail::sr_path.c_str());
|
||||
std::cout << "[FAIL] Save finished" << std::endl;
|
||||
// TODO: Log-Level?
|
||||
fail::simulator.saveDone();
|
||||
// loop allows to call save() multiple times in a row
|
||||
while (fail::save_bochs_request) {
|
||||
assert(fail::sr_path.size() > 0 && "FATAL ERROR: tried to save state without valid path");
|
||||
SIM->save_state(fail::sr_path.c_str());
|
||||
std::cout << "[FAIL] Save finished" << std::endl;
|
||||
// TODO: Log-Level?
|
||||
fail::simulator.saveDone();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user