replay: introduce a central report point for sync errors

Figuring out why replay has failed is tricky at the best of times.
Lets centralise the reporting of a replay sync error and add a little
bit of extra information to help with debugging.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231211091346.14616-10-alex.bennee@linaro.org>
This commit is contained in:
Alex Bennée 2023-12-11 09:13:38 +00:00
parent 2b7a58b60a
commit dcda73211c
4 changed files with 131 additions and 1 deletions

View file

@ -175,6 +175,7 @@ void replay_fetch_data_kind(void)
if (replay_file) {
if (!replay_state.has_unread_data) {
replay_state.data_kind = replay_get_byte();
replay_state.current_event++;
if (replay_state.data_kind == EVENT_INSTRUCTION) {
replay_state.instruction_count = replay_get_dword();
}