aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbstub.c b/gdbstub.c
index b1efe0bccb..378fdd874d 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -64,7 +64,8 @@ static inline int target_memory_rw_debug(CPUState *cpu, target_ulong addr,
static inline int cpu_gdb_index(CPUState *cpu)
{
#if defined(CONFIG_USER_ONLY)
- return cpu->host_tid;
+ TaskState *ts = (TaskState *) cpu->opaque;
+ return ts->ts_tid;
#else
return cpu->cpu_index + 1;
#endif