aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-24 18:41:06 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-23 02:41:32 +0200
commit3825b28ff128e2bd3cb0a338c21923c926b1f38b (patch)
tree1b8d7341daeaf73d55dc3b89b40ef5dd16e4a712 /gdbstub.c
parent5ca666c765e9e92217a87669365b212abae6f9ce (diff)
downloadqemu-3825b28ff128e2bd3cb0a338c21923c926b1f38b.zip
qemu-3825b28ff128e2bd3cb0a338c21923c926b1f38b.tar.gz
qemu-3825b28ff128e2bd3cb0a338c21923c926b1f38b.tar.bz2
cpu: Change cpu_single_step() argument to CPUState
Use CPUState::env_ptr for now. Needed for GdbState::c_cpu. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 6ddff91..8e23509 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2154,7 +2154,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
s->c_cpu = env;
}
if (res == 's') {
- cpu_single_step(s->c_cpu, sstep_flags);
+ cpu_single_step(ENV_GET_CPU(s->c_cpu), sstep_flags);
}
s->signal = res_signal;
gdb_continue(s);
@@ -2182,7 +2182,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
addr = strtoull(p, (char **)&p, 16);
gdb_set_cpu_pc(s, addr);
}
- cpu_single_step(s->c_cpu, sstep_flags);
+ cpu_single_step(ENV_GET_CPU(s->c_cpu), sstep_flags);
gdb_continue(s);
return RS_IDLE;
case 'F':
@@ -2570,7 +2570,7 @@ send_packet:
put_packet(s, buf);
/* disable single step if it was enabled */
- cpu_single_step(env, 0);
+ cpu_single_step(cpu, 0);
}
#endif
@@ -2763,6 +2763,7 @@ gdb_queuesig (void)
int
gdb_handlesig(CPUArchState *env, int sig)
{
+ CPUState *cpu = ENV_GET_CPU(env);
GDBState *s;
char buf[256];
int n;
@@ -2773,7 +2774,7 @@ gdb_handlesig(CPUArchState *env, int sig)
}
/* disable single step if it was enabled */
- cpu_single_step(env, 0);
+ cpu_single_step(cpu, 0);
tb_flush(env);
if (sig != 0) {