From: Tom Tromey <tromey@redhat.com>
To: Hui Zhu <teawater@gmail.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [RFA]corelow.c: Add tid to add_to_thread_list
Date: Thu, 05 Aug 2010 18:44:00 -0000 [thread overview]
Message-ID: <m339usx5kc.fsf@fleche.redhat.com> (raw)
In-Reply-To: <AANLkTi=zuEDw6qiZ1jRatkdwHO99xF2Qu+WZ7i0EQjef@mail.gmail.com> (Hui Zhu's message of "Tue, 3 Aug 2010 16:48:30 +0800")
>>>>> ">" == 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
next prev parent reply other threads:[~2010-08-05 18:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-03 8:49 Hui Zhu
2010-08-05 18:44 ` Tom Tromey [this message]
2010-08-06 2:56 ` Hui Zhu
2010-08-06 9:57 ` Pedro Alves
2010-08-06 16:48 ` Hui Zhu
2010-08-06 17:18 ` Pedro Alves
2010-08-06 20:06 ` Pedro Alves
2010-08-06 20:50 ` Maciej W. Rozycki
2010-08-09 2:28 ` Hui Zhu
2010-08-09 14:48 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m339usx5kc.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=teawater@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).