summaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-03-15 11:47:45 +0200
committerAvi Kivity <avi@redhat.com>2009-03-15 11:47:45 +0200
commit80384df5fdd744d94c3bd0d0a639a282315d3ddf (patch)
tree10ab961e243b94a6dbbc00fca605cb1784dbdd27 /gdbstub.c
parent998e4d2f598ff44d00f64d528939bfd39ca11a6c (diff)
parent7f70c93716412b0874ae231c2f5416edccb22e7f (diff)
Merge branch 'qemu-cvs'
* qemu-cvs: (29 commits) Make the ELF loader aware of backwards compatibility temporarily disable logging around pci config writes (Avi Kivity) stop dirty logging while updating cirrus bank memory (Glauber Costa) Add missing file Update changelog qemu:virtio-net: Check return size on the correct sg list (Alex Williamson) make qemu_announce_self handle non contiguous net tables (Marcelo Tosatti) Replace asprintf() with snprintf() in vnc.c ("Daniel P. Berrange") monitor: Provide empty command as final history entry (Jan Kiszka) Add and use remaining #defines for PCI device IDs (Stuart Brady) remove is_graphic_console from vga.c (Stefano Stabellini) DisplayAllocator interface (Stefano Stabellini) tcg/x86_64: add bswap16_i{32,64} and bswap32_i64 ops tcg/x86: add bswap16_i32 ops target-i386: use the new bswap* TCG ops target-ppc: use the new bswap* TCG ops tcg: update README wrt recent bswap changes tcg: add _tl aliases to bswap16/32/64 TCG ops tcg: add bswap16_i64 and bswap32_i64 TCG ops tcg: optimize tcg_gen_bswap16_i32 ... Conflicts: qemu/gdbstub.c qemu/hw/apic.c qemu/hw/vga.c qemu/monitor.c Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 6a41f3f3b..b8774a14c 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -40,6 +40,7 @@
#define MAX_PACKET_LENGTH 4096
#include "qemu_socket.h"
+#include "kvm.h"
enum {
@@ -1543,7 +1544,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
addr = strtoull(p, (char **)&p, 16);
#if defined(TARGET_I386)
s->c_cpu->eip = addr;
- kvm_load_registers(s->c_cpu);
+ cpu_synchronize_state(s->c_cpu, 1);
#elif defined (TARGET_PPC)
s->c_cpu->nip = addr;
kvm_load_registers(s->c_cpu);
@@ -1586,7 +1587,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
addr = strtoull(p, (char **)&p, 16);
#if defined(TARGET_I386)
s->c_cpu->eip = addr;
- kvm_load_registers(s->c_cpu);
+ cpu_synchronize_state(s->c_cpu, 1);
#elif defined (TARGET_PPC)
s->c_cpu->nip = addr;
kvm_load_registers(s->c_cpu);
@@ -1633,7 +1634,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
}
break;
case 'g':
- kvm_save_registers(s->g_cpu);
+ cpu_synchronize_state(s->g_cpu, 0);
len = 0;
for (addr = 0; addr < num_g_regs; addr++) {
reg_size = gdb_read_register(s->g_cpu, mem_buf + len, addr);
@@ -1651,7 +1652,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
len -= reg_size;
registers += reg_size;
}
- kvm_load_registers(s->g_cpu);
+ cpu_synchronize_state(s->g_cpu, 1);
put_packet(s, "OK");
break;
case 'm':
@@ -1810,7 +1811,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
thread = strtoull(p+16, (char **)&p, 16);
for (env = first_cpu; env != NULL; env = env->next_cpu)
if (env->cpu_index + 1 == thread) {
- kvm_save_registers(env);
+ cpu_synchronize_state(env, 0);
len = snprintf((char *)mem_buf, sizeof(mem_buf),
"CPU#%d [%s]", env->cpu_index,
env->halted ? "halted " : "running");