diff options
Diffstat (limited to 'gdbstub.c')
-rw-r--r-- | gdbstub.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1954,8 +1954,10 @@ static int gdb_breakpoint_insert(target_ulong addr, target_ulong len, int type) CPUArchState *env; int err = 0; - if (kvm_enabled()) - return kvm_insert_breakpoint(gdbserver_state->c_cpu, addr, len, type); + if (kvm_enabled()) { + return kvm_insert_breakpoint(ENV_GET_CPU(gdbserver_state->c_cpu), + addr, len, type); + } switch (type) { case GDB_BREAKPOINT_SW: @@ -1991,8 +1993,10 @@ static int gdb_breakpoint_remove(target_ulong addr, target_ulong len, int type) CPUArchState *env; int err = 0; - if (kvm_enabled()) - return kvm_remove_breakpoint(gdbserver_state->c_cpu, addr, len, type); + if (kvm_enabled()) { + return kvm_remove_breakpoint(ENV_GET_CPU(gdbserver_state->c_cpu), + addr, len, type); + } switch (type) { case GDB_BREAKPOINT_SW: |