diff mbox

[PULL,10/10] gdbstub: Set current CPU on interruptions

Message ID 226d007dbd75ec8d0f12d0f9e1ce66caf55d49e4.1438026619.git.mjt@msgid.tls.msk.ru
State New
Headers show

Commit Message

Michael Tokarev July 27, 2015, 7:54 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

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 <jan.kiszka@siemens.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 gdbstub.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

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: