From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: "Jan Kratochvil (jan.kratochvil@redhat.com)" <jan.kratochvil@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
"markus.t.metzger@gmail.com" <markus.t.metzger@gmail.com>,
"palves@redhat.com" <palves@redhat.com>,
"Tom Tromey (tromey@redhat.com)" <tromey@redhat.com>
Subject: RE: [PATCH 1/1] gdb, python: update threads in Inferior.threads ()
Date: Tue, 24 Jul 2012 08:08:00 -0000 [thread overview]
Message-ID: <A78C989F6D9628469189715575E55B2307AC4CE5@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <2832024D-3061-4A13-BBF5-656C504C295D@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1368 bytes --]
> > From: Jan Kratochvil <jan.kratochvil@redhat.com>
> > Subject: Re: [PATCH 1/1] gdb, python: update threads in Inferior.threads ()
> > Date: July 19, 2012 8:40:50 PM GMT+02:00
Thanks for your review!
> > On Thu, 19 Jul 2012 17:29:17 +0200, markus.t.metzger@intel.com wrote:
> >> gdb/python/
> >> * py-inferior.c (infpy_threads): Call update_thread_list ().
> >>
> >> gdb/testsuite/gdb.python/
> >> * py-threads.c: New file.
> >> * py-threads.exp: New file.
> >
> > OK with the issue below but please check it in only after several days, there
> > is questionable the caching of threads list.
I don't have write access. Regarding the caching question, this is being discussed here:
http://sourceware.org/ml/gdb-patches/2012-07/msg00382.html.
> >> +static void *
> >> +thread (void *param)
> >> +{
> >> + for (;;)
> >> + ;
> >
> > (1) Never create needlessly busy-looping testcases.
> > Therefore use sleep().
> >
> > (2) Never create testcases which run forever, always use some reasonable
> > timeout (such as 60 seconds).
I now use a barrier to synchronize threads. This should satisfy both requirements.
> >> + return param;
> >> +}
> > [...]
> >> +gdb_test "python print len(gdb.selected_inferior().threads())" "9" "py-threads"
> >
> > Nitpick but better "\r\n9" as otherwise any number x%10==9 would match.
Done. Thanks.
Regards,
Markus.
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 350 bytes --]
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer, Christian Lamprechter
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
next prev parent reply other threads:[~2012-07-24 8:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 15:30 markus.t.metzger
2012-07-19 18:41 ` Jan Kratochvil
[not found] ` <2832024D-3061-4A13-BBF5-656C504C295D@gmail.com>
2012-07-24 8:08 ` Metzger, Markus T [this message]
2012-07-25 16:13 ` Tom Tromey
2012-07-26 5:51 ` Metzger, Markus T
2012-07-25 16:16 ` Tom Tromey
-- strict thread matches above, loose matches on Subject: below --
2012-07-26 12:20 markus.t.metzger
2012-07-25 8:27 markus.t.metzger
2012-07-25 16:15 ` Tom Tromey
2012-07-26 7:51 ` Metzger, Markus T
2012-07-26 8:43 ` Jan Kratochvil
2012-07-26 8:49 ` Metzger, Markus T
2012-07-24 8:12 markus.t.metzger
2012-07-24 14:36 ` Phil Muldoon
2012-07-06 9:50 markus.t.metzger
2012-07-06 18:12 ` Tom Tromey
2012-07-19 15:27 ` Metzger, Markus T
2012-07-18 13:54 ` Jan Kratochvil
2012-07-19 15:27 ` Metzger, Markus T
2012-07-19 18:45 ` Jan Kratochvil
2012-07-20 7:57 ` Metzger, Markus T
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=A78C989F6D9628469189715575E55B2307AC4CE5@IRSMSX102.ger.corp.intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=markus.t.metzger@gmail.com \
--cc=palves@redhat.com \
--cc=tromey@redhat.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