]> git.proxmox.com Git - qemu.git/blobdiff - gdbstub.h
vfio-pci: Mark non-migratable
[qemu.git] / gdbstub.h
index b44e27523ade240d07d309c8a4733cba03f696a0..668de660004d840dbf1e21c73863dc95539a3027 100644 (file)
--- a/gdbstub.h
+++ b/gdbstub.h
@@ -30,6 +30,15 @@ void gdb_register_coprocessor(CPUArchState *env,
                               gdb_reg_cb get_reg, gdb_reg_cb set_reg,
                               int num_regs, const char *xml, int g_pos);
 
+static inline int cpu_index(CPUArchState *env)
+{
+#if defined(CONFIG_USER_ONLY) && defined(CONFIG_USE_NPTL)
+    return env->host_tid;
+#else
+    return env->cpu_index + 1;
+#endif
+}
+
 #endif
 
 #ifdef CONFIG_USER_ONLY