diff options
author | Andreas Färber <afaerber@suse.de> | 2013-08-12 18:09:47 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-09-24 17:12:22 -0500 |
commit | c0c080c5d1ce6c236ba8ab5db3a17043c665d0f6 (patch) | |
tree | 82a3204561b44ed9b99bf7792f7ef1593566903a /qom | |
parent | 670599a08c052f6ef841743731a8f06d4b50ec99 (diff) | |
download | qemu-c0c080c5d1ce6c236ba8ab5db3a17043c665d0f6.tar.gz |
gdbstub: Fix gdb_register_coprocessor() register counting
Commit a0e372f0c49ac01faeaeb73a6e8f50e8ac615f34 reorganized the register
counting for GDB. While it seems correct not to let the total number of
registers skyrocket in an SMP scenario through a static variable, the
distinction between total register count and 'g' packet register count
(last_reg vs. num_g_regs) got lost among the way.
Fix this by introducing CPUState::gdb_num_g_regs and using that in
gdb_handle_packet().
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: qemu-stable@nongnu.org (stable-1.6)
Tested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
(cherry picked from commit 35143f0164e6933a85c7c2b8a89a040d881a9151)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qom')
-rw-r--r-- | qom/cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -240,7 +240,7 @@ static void cpu_common_initfn(Object *obj) CPUState *cpu = CPU(obj); CPUClass *cc = CPU_GET_CLASS(obj); - cpu->gdb_num_regs = cc->gdb_num_core_regs; + cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs; } static int64_t cpu_common_get_arch_id(CPUState *cpu) |