This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA]corelow.c: Add tid to add_to_thread_list
- From: Tom Tromey <tromey at redhat dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Thu, 05 Aug 2010 12:44:35 -0600
- Subject: Re: [RFA]corelow.c: Add tid to add_to_thread_list
- References: <AANLkTi=zuEDw6qiZ1jRatkdwHO99xF2Qu+WZ7i0EQjef@mail.gmail.com>
>>>>> ">" == Hui Zhu <teawater@gmail.com> writes:
>> I make a patch for kernel (http://lkml.org/lkml/2010/8/3/75) but they
>> think it should be fixed in user space.
>> So I add the tid to add_to_thread_list.
I don't know about this area of gdb, so I can't really comment on the
semantics of the change, but I do have a comment about how the change is
written:
>> - ptid = ptid_build (pid, lwpid, 0);
>> + tid = 0;
>> +get_ptid:
>> + ptid = ptid_build (pid, lwpid, tid);
>> + if (find_thread_ptid (ptid))
>> + {
>> + tid ++;
>> + goto get_ptid;
>> + }
I think this would be more readably written without 'goto', as a loop.
Tom