res = true;
}
switch (replay_state.data_kind) {
- case EVENT_SHUTDOWN:
+ case EVENT_SHUTDOWN ... EVENT_SHUTDOWN_LAST:
replay_finish_event();
- qemu_system_shutdown_request();
+ qemu_system_shutdown_request(replay_state.data_kind -
+ EVENT_SHUTDOWN);
break;
default:
/* clock, time_t, checkpoint and other events */
if (replay_state.instructions_count > 0) {
int count = (int)(replay_get_current_step()
- replay_state.current_step);
+
+ /* Time can only go forward */
+ assert(count >= 0);
+
replay_state.instructions_count -= count;
replay_state.current_step += count;
if (replay_state.instructions_count == 0) {
return res;
}
-void replay_shutdown_request(void)
+void replay_shutdown_request(ShutdownCause cause)
{
if (replay_mode == REPLAY_MODE_RECORD) {
replay_mutex_lock();
- replay_put_event(EVENT_SHUTDOWN);
+ replay_put_event(EVENT_SHUTDOWN + cause);
replay_mutex_unlock();
}
}