From: Phil Muldoon <pmuldoon@redhat.com>
To: markus.t.metzger@intel.com
Cc: gdb-patches@sourceware.org, markus.t.metzger@gmail.com,
jan.kratochvil@redhat.com, palves@redhat.com,
tromey@redhat.com
Subject: Re: [PATCH 1/1] gdb, python: update threads in Inferior.threads ()
Date: Tue, 24 Jul 2012 14:36:00 -0000 [thread overview]
Message-ID: <500EB2E4.6050009@redhat.com> (raw)
In-Reply-To: <1343117514-24895-1-git-send-email-markus.t.metzger@intel.com>
On 07/24/2012 09:11 AM, markus.t.metzger@intel.com wrote:
> From: Markus Metzger <markus.t.metzger@intel.com>
>
> When querying an inferior's threads in Python in a remote debugging
> configuration, only the already known threads are returned.
Thanks.
> Update the thread list in infpy_threads () before creating the Python objects.
>
> 2012-07-24 Markus Metzger <markus.t.metzger@intel.com>
>
> gdb/python/
> * py-inferior.c (infpy_threads): Call update_thread_list ().>
ChangeLog paths are relative, so in these entries you do not need the
"gdb" section. Also the path and entry should be appended to be on
the same line. E.g.:
2012-07-24 Markus Metzger <markus.t.metzger@intel.com>
* python/py-inferior.c (infpy_threads): Call update_thread_list ().
> gdb/testsuite/gdb.python/
> * py-threads.c: New file.
> * py-threads.exp: New file.
>
The testsuite has its own ChangeLog located in testsuite/, so these
entries need to go there. Also, the paths are relative too, so no
"gdb/testsuite" in those entries.
> diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
> index 2b229be..22adf8c 100644
> --- a/gdb/python/py-inferior.c
> +++ b/gdb/python/py-inferior.c
> @@ -300,6 +300,11 @@ infpy_threads (PyObject *self, PyObject *args)
> struct threadlist_entry *entry;
> inferior_object *inf_obj = (inferior_object *) self;
> PyObject *tuple;
> + volatile struct gdb_exception except;
> +
> + TRY_CATCH (except, RETURN_MASK_ALL)
> + update_thread_list ();
> + GDB_PY_HANDLE_EXCEPTION (except);
>
> INFPY_REQUIRE_VALID (inf_obj);
If the inferior is no longer around, then updating the thread list is
invalid. update_thread_list and the associated thread exception code
should be hoisted below the inferior validity check performed in
INFPY_REQUIRE_VALID.
> diff --git a/gdb/testsuite/gdb.python/py-threads.c b/gdb/testsuite/gdb.python/py-threads.c
> new file mode 100644
> diff --git a/gdb/testsuite/gdb.python/py-threads.exp b/gdb/testsuite/gdb.python/py-threads.exp
> new file mode 100644
py-inferior has its own series of test cases in py-inferior.exp, with the test
inferior being py-inferior.c. I would prefer it if we could keep
these tests as one unit. Could you try merging the two testcases?
Thanks
Phil
next prev parent reply other threads:[~2012-07-24 14:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 8:12 markus.t.metzger
2012-07-24 14:36 ` Phil Muldoon [this message]
-- 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-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
2012-07-25 16:13 ` Tom Tromey
2012-07-26 5:51 ` Metzger, Markus T
2012-07-25 16:16 ` Tom Tromey
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=500EB2E4.6050009@redhat.com \
--to=pmuldoon@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=markus.t.metzger@gmail.com \
--cc=markus.t.metzger@intel.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