qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] gdbstub: Set current CPU on interruptions


From: Jan Kiszka
Subject: [Qemu-trivial] [PATCH] gdbstub: Set current CPU on interruptions
Date: Fri, 24 Jul 2015 18:52:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

gdb expects that the thread ID for c and g-class operations is set to
the CPU we provide when reporting VM stop conditions. If the stub is
still tuned to a different CPU, the wrong information is delivered to
the gdb frontend.

Signed-off-by: Jan Kiszka <address@hidden>
---
 gdbstub.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdbstub.c b/gdbstub.c
index 92b2f81..ffe7e6e 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1285,6 +1285,7 @@ static void gdb_vm_state_change(void *opaque, int 
running, RunState state)
         ret = GDB_SIGNAL_UNKNOWN;
         break;
     }
+    gdb_set_stop_cpu(cpu);
     snprintf(buf, sizeof(buf), "T%02xthread:%02x;", ret, cpu_index(cpu));
 
 send_packet:
-- 
2.1.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]