[PATCH v2 16/16] replay: report sync error when no exception in log (!DEBUG INVESTIGATION)

Alex Bennée posted 16 patches 1 year, 11 months ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>
[PATCH v2 16/16] replay: report sync error when no exception in log (!DEBUG INVESTIGATION)
Posted by Alex Bennée 1 year, 11 months ago
If replay_exception returns false we can only trigger an exit from the
main loop and hope something unwinds to something we can process. This
seems to be the point where execution diverges in the replay_linux
tests case.

DISCUSSION: Maybe this should be tightened up to check the remaining
instruction count?

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 replay/replay.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/replay/replay.c b/replay/replay.c
index 665dbb34fb..d283c1353d 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -209,11 +209,12 @@ bool replay_exception(void)
         return true;
     } else if (replay_mode == REPLAY_MODE_PLAY) {
         g_assert(replay_mutex_locked());
-        bool res = replay_has_exception();
-        if (res) {
+        if (replay_has_exception()) {
             replay_finish_event();
+            return true;
+        } else {
+            replay_sync_error("Exception not in log");
         }
-        return res;
     }
 
     return true;
-- 
2.39.2