Skip to contentSkip to conversation

gdbstub: Set current CPU on interruptions

PATCH Applied Jan Kiszka 2 participants 2 messages Jul 24, 2015 – Jul 27, 2015

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 gdbstub: Set current CPU on interruptions

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.

---
 gdbstub.c | 1 +
 1 file changed, 1 insertion(+)
gdbstub.c +1 -0
index 92b2f81..ffe7e6e 100644
@@ -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:
Signature · 1 line
2.1.4
#1 lore raw
Quoted 4 lines · Jan Kiszka

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.

Applied to -trivial, thanks!

/mjt