mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
accel: Pass AccelState argument to gdbstub_supported_sstep_flags()
In order to have AccelClass methods instrospect their state, we need to pass AccelState by argument. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250703173248.44995-37-philmd@linaro.org>
This commit is contained in:
parent
1e9fb43d30
commit
842e7eecd4
5 changed files with 5 additions and 5 deletions
|
|
@ -124,7 +124,7 @@ int accel_supported_gdbstub_sstep_flags(void)
|
|||
AccelState *accel = current_accel();
|
||||
AccelClass *acc = ACCEL_GET_CLASS(accel);
|
||||
if (acc->gdbstub_supported_sstep_flags) {
|
||||
return acc->gdbstub_supported_sstep_flags();
|
||||
return acc->gdbstub_supported_sstep_flags(accel);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ static int hvf_accel_init(AccelState *as, MachineState *ms)
|
|||
return hvf_arch_init();
|
||||
}
|
||||
|
||||
static int hvf_gdbstub_sstep_flags(void)
|
||||
static int hvf_gdbstub_sstep_flags(AccelState *as)
|
||||
{
|
||||
return SSTEP_ENABLE | SSTEP_NOIRQ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3980,7 +3980,7 @@ static void kvm_accel_instance_init(Object *obj)
|
|||
* Returns: SSTEP_* flags that KVM supports for guest debug. The
|
||||
* support is probed during kvm_init()
|
||||
*/
|
||||
static int kvm_gdbstub_sstep_flags(void)
|
||||
static int kvm_gdbstub_sstep_flags(AccelState *as)
|
||||
{
|
||||
return kvm_sstep_flags;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ static void tcg_set_one_insn_per_tb(Object *obj, bool value, Error **errp)
|
|||
qatomic_set(&one_insn_per_tb, value);
|
||||
}
|
||||
|
||||
static int tcg_gdbstub_supported_sstep_flags(void)
|
||||
static int tcg_gdbstub_supported_sstep_flags(AccelState *as)
|
||||
{
|
||||
/*
|
||||
* In replay mode all events will come from the log and can't be
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ typedef struct AccelClass {
|
|||
hwaddr start_addr, hwaddr size);
|
||||
|
||||
/* gdbstub related hooks */
|
||||
int (*gdbstub_supported_sstep_flags)(void);
|
||||
int (*gdbstub_supported_sstep_flags)(AccelState *as);
|
||||
|
||||
bool *allowed;
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue