[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] gdbstub:Return non-zero value for thread-id in
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] gdbstub:Return non-zero value for thread-id in user mode |
Date: |
Tue, 30 Jun 2015 09:19:26 +0100 |
On 30 June 2015 at 06:55, Bhushan Attarde <address@hidden> wrote:
> When client requests the stop information by sending ? packet, the gdbstub
> replies with stop info packet which includes thread-id of the stopped thread.
> In user mode this thread-id is given by cpu->host_tid, which could be zero.
> Some clients treats thread-id zero as invalid thread-id.
>
> This patch ensures that in user mode, gdbstub returns non-zero value for
> thread-id in stop reply packet.
Wouldn't it be better to identify why cpu->host_tid might be
zero and fix that?
It looks like this might just be that we only set cpu->host_tid
when the linux-user process runs clone(), so it gets set for
new threads but not for the original one. We could fix that by
having linux-user/ set it for the initial thread too.
thanks
-- PMM