[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v10 23/24] replay: fix replay shutdown
From: |
Pavel Dovgalyuk |
Subject: |
[Qemu-devel] [PATCH v10 23/24] replay: fix replay shutdown |
Date: |
Thu, 17 Jan 2019 10:39:01 +0300 |
User-agent: |
StGit/0.17.1-dirty |
This patch fixes shutdown of the replay process, which is terminated with
the assert when shutdown event is read from the log.
replay_finish_event reads new data_kind and therefore the value of data_kind
should be preserved to be valid at qemu_system_shutdown_request call.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
replay/replay.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/replay/replay.c b/replay/replay.c
index e578958..8f2e17c 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -49,14 +49,14 @@ bool replay_next_event_is(int event)
}
while (true) {
- if (event == replay_state.data_kind) {
+ unsigned int data_kind = replay_state.data_kind;
+ if (event == data_kind) {
res = true;
}
- switch (replay_state.data_kind) {
+ switch (data_kind) {
case EVENT_SHUTDOWN ... EVENT_SHUTDOWN_LAST:
replay_finish_event();
- qemu_system_shutdown_request(replay_state.data_kind -
- EVENT_SHUTDOWN);
+ qemu_system_shutdown_request(data_kind - EVENT_SHUTDOWN);
break;
default:
/* clock, time_t, checkpoint and other events */
- Re: [Qemu-devel] [PATCH v10 13/24] replay: implement replay-seek command, (continued)
- [Qemu-devel] [PATCH v10 14/24] replay: refine replay-time module, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 15/24] replay: flush rr queue before loading the vmstate, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 16/24] gdbstub: add reverse step support in replay mode, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 18/24] replay: describe reverse debugging in docs/replay.txt, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 17/24] gdbstub: add reverse continue support in replay mode, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 19/24] replay: add BH oneshot event for block layer, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 20/24] replay: init rtc after enabling the replay, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 21/24] replay: document development rules, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 22/24] util/qemu-timer: refactor deadline calculation for external timers, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 23/24] replay: fix replay shutdown,
Pavel Dovgalyuk <=
- [Qemu-devel] [PATCH v10 24/24] replay: rename step-related variables and functions, Pavel Dovgalyuk, 2019/01/17
- Re: [Qemu-devel] [PATCH v10 00/24] Fixing record/replay and adding reverse debugging, no-reply, 2019/01/31