mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
accel: Remove AccelOpsClass::supports_guest_debug
Now accelerators hold the 'guest debug supported' information in their state, accessible by the common code. No need to call a per-accelerator handler, simply check for the SSTEP_ENABLE in AccelGdbConfig::sstep_flags. Remove all AccelOpsClass::supports_guest_debug implementations, inline gdb_supports_guest_debug() and remove the now unnecessary KVMState::have_guest_debug field. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20260705215729.62196-18-philmd@oss.qualcomm.com>
This commit is contained in:
@@ -331,8 +331,6 @@ static void create_processes(GDBState *s)
|
||||
gdb_create_default_process(s);
|
||||
}
|
||||
|
||||
static bool gdb_supports_guest_debug(void);
|
||||
|
||||
bool gdbserver_start(const char *device, Error **errp)
|
||||
{
|
||||
Chardev *chr = NULL;
|
||||
@@ -345,7 +343,7 @@ bool gdbserver_start(const char *device, Error **errp)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!gdb_supports_guest_debug()) {
|
||||
if (!accel_supports_guest_debug(current_accel())) {
|
||||
error_setg(errp, "gdbstub: current accelerator doesn't "
|
||||
"support guest debugging");
|
||||
return false;
|
||||
@@ -624,15 +622,6 @@ int gdb_signal_to_target(int sig)
|
||||
* Break/Watch point helpers
|
||||
*/
|
||||
|
||||
static bool gdb_supports_guest_debug(void)
|
||||
{
|
||||
const AccelOpsClass *ops = cpus_get_accel();
|
||||
if (ops->supports_guest_debug) {
|
||||
return ops->supports_guest_debug();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int gdb_breakpoint_insert(CPUState *cs, int type, vaddr addr, vaddr len)
|
||||
{
|
||||
const AccelOpsClass *ops = cpus_get_accel();
|
||||
|
||||
Reference in New Issue
Block a user