diff options
| author | Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> | 2026-06-26 12:41:49 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> | 2026-07-06 15:42:18 +0200 |
| commit | 2aaa8ee7dec5a8a10ec2c69ea774971e940f26d3 (patch) | |
| tree | ff5f94c1ca488c8a6765abd50fa7bfcb755e600d /gdbstub | |
| parent | d1286e29336815305f016adf8ed6ae181e68a532 (diff) | |
| download | qemu-2aaa8ee7dec5a8a10ec2c69ea774971e940f26d3.tar.gz qemu-2aaa8ee7dec5a8a10ec2c69ea774971e940f26d3.zip | |
accel: Hold @can_reverse information in AccelGdbConfig
Hold @can_reverse in AccelGdbConfig, set it when initializing
AccelState in AccelClass::init_machine handlers (only TCG sets
it). Remove gdb_can_reverse() as now unused.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-ID: <20260705215729.62196-17-philmd@oss.qualcomm.com>
Diffstat (limited to 'gdbstub')
| -rw-r--r-- | gdbstub/gdbstub.c | 4 | ||||
| -rw-r--r-- | gdbstub/internals.h | 1 | ||||
| -rw-r--r-- | gdbstub/system.c | 5 | ||||
| -rw-r--r-- | gdbstub/user.c | 6 |
4 files changed, 2 insertions, 14 deletions
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 6c4fa06563..0a328b0dd4 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1376,7 +1376,7 @@ static void handle_step(GArray *params, void *user_ctx) static void handle_backward(GArray *params, void *user_ctx) { - if (!gdb_can_reverse()) { + if (!gdbserver_state.accel_config.can_reverse) { gdb_put_packet("E22"); return; } @@ -1684,7 +1684,7 @@ static void handle_query_supported(GArray *params, void *user_ctx) g_string_append(gdbserver_state.str_buf, ";qXfer:features:read+"); } - if (gdb_can_reverse()) { + if (gdbserver_state.accel_config.can_reverse) { g_string_append(gdbserver_state.str_buf, ";ReverseStep+;ReverseContinue+"); } diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 0444dee224..0b74ea4000 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -154,7 +154,6 @@ CPUState *gdb_first_attached_cpu(void); void gdb_append_thread_id(CPUState *cpu, GString *buf); int gdb_get_cpu_index(CPUState *cpu); unsigned int gdb_get_max_cpus(void); /* both */ -bool gdb_can_reverse(void); /* system emulation, stub for user */ int gdb_target_sigtrap(void); /* user */ void gdb_create_default_process(GDBState *s); diff --git a/gdbstub/system.c b/gdbstub/system.c index 1179c82cb8..2e8c457097 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -479,11 +479,6 @@ unsigned int gdb_get_max_cpus(void) return ms->smp.max_cpus; } -bool gdb_can_reverse(void) -{ - return replay_mode == REPLAY_MODE_PLAY; -} - /* * Softmmu specific command helpers */ diff --git a/gdbstub/user.c b/gdbstub/user.c index f7bc4e63df..299388b9f7 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -786,12 +786,6 @@ unsigned int gdb_get_max_cpus(void) return max_cpus; } -/* replay not supported for user-mode */ -bool gdb_can_reverse(void) -{ - return false; -} - /* * Break/Watch point helpers */ |
