aboutsummaryrefslogtreecommitdiff
path: root/gdbstub
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2022-09-29 12:42:23 +0100
committerAlex Bennée <alex.bennee@linaro.org>2022-10-06 11:53:41 +0100
commit3b7a93880a88fb2e3c0e71378a7d39d25103d734 (patch)
tree5dcaa148ff39601c313147703495d926cb2c402d /gdbstub
parent842b42df2b5d3bf5ccbafba19dc756d531dcce23 (diff)
downloadqemu-3b7a93880a88fb2e3c0e71378a7d39d25103d734.zip
qemu-3b7a93880a88fb2e3c0e71378a7d39d25103d734.tar.gz
qemu-3b7a93880a88fb2e3c0e71378a7d39d25103d734.tar.bz2
gdbstub: move sstep flags probing into AccelClass
The support of single-stepping is very much dependent on support from the accelerator we are using. To avoid special casing in gdbstub move the probing out to an AccelClass function so future accelerators can put their code there. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Mads Ynddal <mads@ynddal.dk> Message-Id: <20220929114231.583801-44-alex.bennee@linaro.org>
Diffstat (limited to 'gdbstub')
-rw-r--r--gdbstub/gdbstub.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 7d8fe47..a0755e6 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -383,27 +383,13 @@ static void init_gdbserver_state(void)
gdbserver_state.last_packet = g_byte_array_sized_new(MAX_PACKET_LENGTH + 4);
/*
- * In replay mode all events will come from the log and can't be
- * suppressed otherwise we would break determinism. However as those
- * events are tied to the number of executed instructions we won't see
- * them occurring every time we single step.
- */
- if (replay_mode != REPLAY_MODE_NONE) {
- gdbserver_state.supported_sstep_flags = SSTEP_ENABLE;
- } else if (kvm_enabled()) {
- gdbserver_state.supported_sstep_flags = kvm_get_supported_sstep_flags();
- } else {
- gdbserver_state.supported_sstep_flags =
- SSTEP_ENABLE | SSTEP_NOIRQ | SSTEP_NOTIMER;
- }
-
- /*
- * By default use no IRQs and no timers while single stepping so as to
- * make single stepping like an ICE HW step.
+ * What single-step modes are supported is accelerator dependent.
+ * By default try to use no IRQs and no timers while single
+ * stepping so as to make single stepping like a typical ICE HW step.
*/
+ gdbserver_state.supported_sstep_flags = accel_supported_gdbstub_sstep_flags();
gdbserver_state.sstep_flags = SSTEP_ENABLE | SSTEP_NOIRQ | SSTEP_NOTIMER;
gdbserver_state.sstep_flags &= gdbserver_state.supported_sstep_flags;
-
}
#ifndef CONFIG_USER_ONLY