aboutsummaryrefslogtreecommitdiff
path: root/gdbstub/gdbstub.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-03-02 18:57:53 -0800
committerAlex Bennée <alex.bennee@linaro.org>2023-03-07 20:44:08 +0000
commit505601d5806a5b9a8acde140da5b507bdd03a794 (patch)
treee6124951ffe8198a0e086859bb948f8f5af34cb6 /gdbstub/gdbstub.c
parent7ea0c33deffbbfc6b378f51503139aaa036322d6 (diff)
gdbstub: specialise stub_can_reverse
Currently we only support replay for softmmu mode so it is a constant false for user-mode. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230302190846.2593720-18-alex.bennee@linaro.org> Message-Id: <20230303025805.625589-18-richard.henderson@linaro.org>
Diffstat (limited to 'gdbstub/gdbstub.c')
-rw-r--r--gdbstub/gdbstub.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 1b783100c2..7301466ff5 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -113,15 +113,6 @@ int use_gdb_syscalls(void)
return gdb_syscall_mode == GDB_SYS_ENABLED;
}
-static bool stub_can_reverse(void)
-{
-#ifdef CONFIG_USER_ONLY
- return false;
-#else
- return replay_mode == REPLAY_MODE_PLAY;
-#endif
-}
-
/* writes 2*len+1 bytes in buf */
void gdb_memtohex(GString *buf, const uint8_t *mem, int len)
{
@@ -1308,7 +1299,7 @@ static void handle_step(GArray *params, void *user_ctx)
static void handle_backward(GArray *params, void *user_ctx)
{
- if (!stub_can_reverse()) {
+ if (!gdb_can_reverse()) {
gdb_put_packet("E22");
}
if (params->len == 1) {
@@ -1559,7 +1550,7 @@ static void handle_query_supported(GArray *params, void *user_ctx)
g_string_append(gdbserver_state.str_buf, ";qXfer:features:read+");
}
- if (stub_can_reverse()) {
+ if (gdb_can_reverse()) {
g_string_append(gdbserver_state.str_buf,
";ReverseStep+;ReverseContinue+");
}