Skip to content

Commit 842e7ee

Browse files
committed
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>
1 parent 1e9fb43 commit 842e7ee

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

accel/accel-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ int accel_supported_gdbstub_sstep_flags(void)
124124
AccelState *accel = current_accel();
125125
AccelClass *acc = ACCEL_GET_CLASS(accel);
126126
if (acc->gdbstub_supported_sstep_flags) {
127-
return acc->gdbstub_supported_sstep_flags();
127+
return acc->gdbstub_supported_sstep_flags(accel);
128128
}
129129
return 0;
130130
}

accel/hvf/hvf-all.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static int hvf_accel_init(AccelState *as, MachineState *ms)
281281
return hvf_arch_init();
282282
}
283283

284-
static int hvf_gdbstub_sstep_flags(void)
284+
static int hvf_gdbstub_sstep_flags(AccelState *as)
285285
{
286286
return SSTEP_ENABLE | SSTEP_NOIRQ;
287287
}

accel/kvm/kvm-all.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3980,7 +3980,7 @@ static void kvm_accel_instance_init(Object *obj)
39803980
* Returns: SSTEP_* flags that KVM supports for guest debug. The
39813981
* support is probed during kvm_init()
39823982
*/
3983-
static int kvm_gdbstub_sstep_flags(void)
3983+
static int kvm_gdbstub_sstep_flags(AccelState *as)
39843984
{
39853985
return kvm_sstep_flags;
39863986
}

accel/tcg/tcg-all.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static void tcg_set_one_insn_per_tb(Object *obj, bool value, Error **errp)
219219
qatomic_set(&one_insn_per_tb, value);
220220
}
221221

222-
static int tcg_gdbstub_supported_sstep_flags(void)
222+
static int tcg_gdbstub_supported_sstep_flags(AccelState *as)
223223
{
224224
/*
225225
* In replay mode all events will come from the log and can't be

include/qemu/accel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ typedef struct AccelClass {
5050
hwaddr start_addr, hwaddr size);
5151

5252
/* gdbstub related hooks */
53-
int (*gdbstub_supported_sstep_flags)(void);
53+
int (*gdbstub_supported_sstep_flags)(AccelState *as);
5454

5555
bool *allowed;
5656
/*

0 commit comments

Comments
 (0)