summaryrefslogtreecommitdiffstats
path: root/gdbstub.c
diff options
context:
space:
mode:
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>2015-06-23 19:31:15 -0700
committerAndreas Färber <afaerber@suse.de>2015-07-09 15:20:40 +0200
commitbbd77c180d7ff1b04a7661bb878939b2e1d23798 (patch)
tree8d7d0be38bf6a50002dec632d521efa81b6e0e87 /gdbstub.c
parent6dd0f8342ddfbd8db3e3de1a17686cedbc14e9f1 (diff)
downloadhqemu-bbd77c180d7ff1b04a7661bb878939b2e1d23798.zip
hqemu-bbd77c180d7ff1b04a7661bb878939b2e1d23798.tar.gz
translate-all: Change tb_flush() env argument to cpu
All of the core-code usages of this API have the cpu pointer handy so pass it in. There are only 3 architecture specific usages (2 of which are commented out) which can just use ENV_GET_CPU() locally to get the cpu pointer. The reduces core code usage of the CPU env, which brings us closer to common-obj'ing these core files. Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdbstub.c b/gdbstub.c
index cea2a84..0fa8dd8 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1226,7 +1226,6 @@ void gdb_set_stop_cpu(CPUState *cpu)
static void gdb_vm_state_change(void *opaque, int running, RunState state)
{
GDBState *s = gdbserver_state;
- CPUArchState *env = s->c_cpu->env_ptr;
CPUState *cpu = s->c_cpu;
char buf[256];
const char *type;
@@ -1261,7 +1260,7 @@ static void gdb_vm_state_change(void *opaque, int running, RunState state)
cpu->watchpoint_hit = NULL;
goto send_packet;
}
- tb_flush(env);
+ tb_flush(cpu);
ret = GDB_SIGNAL_TRAP;
break;
case RUN_STATE_PAUSED:
@@ -1490,7 +1489,6 @@ gdb_queuesig (void)
int
gdb_handlesig(CPUState *cpu, int sig)
{
- CPUArchState *env = cpu->env_ptr;
GDBState *s;
char buf[256];
int n;
@@ -1502,7 +1500,7 @@ gdb_handlesig(CPUState *cpu, int sig)
/* disable single step if it was enabled */
cpu_single_step(cpu, 0);
- tb_flush(env);
+ tb_flush(cpu);
if (sig != 0) {
snprintf(buf, sizeof(buf), "S%02x", target_signal_to_gdb(sig));
OpenPOWER on IntegriCloud