[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 27/36] gdbstub: Permit reverse step/break to provide stop resp
From: |
Alex Bennée |
Subject: |
[PATCH v3 27/36] gdbstub: Permit reverse step/break to provide stop response |
Date: |
Tue, 27 Jun 2023 17:09:34 +0100 |
From: Nicholas Piggin <npiggin@gmail.com>
The final part of the reverse step and break handling is to bring
the machine back to a debug stop state. gdb expects a response.
A gdb 'rsi' command hangs forever because the gdbstub filters out
the response (also observable with reverse_debugging.py avocado
tests).
Fix by setting allow_stop_reply for the gdb backward packets.
Fixes: 758370052fb ("gdbstub: only send stop-reply packets when allowed to")
Cc: qemu-stable@nongnu.org
Cc: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Cc: Alex Bennée <alex.bennee@linaro.org>
Cc: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Message-Id: <20230623035304.279833-1-npiggin@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
gdbstub/gdbstub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index be18568d0a..9496d7b175 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -1814,6 +1814,7 @@ static int gdb_handle_packet(const char *line_buf)
.handler = handle_backward,
.cmd = "b",
.cmd_startswith = 1,
+ .allow_stop_reply = true,
.schema = "o0"
};
cmd_parser = &backward_cmd_desc;
--
2.39.2
- [PATCH v3 31/36] linux-user: Emulate /proc/self/smaps, (continued)
- [PATCH v3 31/36] linux-user: Emulate /proc/self/smaps, Alex Bennée, 2023/06/27
- [PATCH v3 35/36] docs: Document security implications of debugging, Alex Bennée, 2023/06/27
- [PATCH v3 18/36] plugins: fix memory leak while parsing options, Alex Bennée, 2023/06/27
- [PATCH v3 06/36] qemu-keymap: properly check return from xkb_keymap_mod_get_index, Alex Bennée, 2023/06/27
- [PATCH v3 21/36] include/migration: mark vmstate_register() as a legacy function, Alex Bennée, 2023/06/27
- [PATCH v3 25/36] docs/devel: introduce some key concepts for QOM development, Alex Bennée, 2023/06/27
- [PATCH v3 27/36] gdbstub: Permit reverse step/break to provide stop response,
Alex Bennée <=
- [PATCH v3 26/36] gdbstub: lightly refactor connection to avoid snprintf, Alex Bennée, 2023/06/27