From: Doug Evans <dje@google.com>
To: Pedro Alves <palves@redhat.com>
Cc: Nick Bull <nicholaspbull@gmail.com>,
gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v7] Events when inferior is modified
Date: Thu, 06 Nov 2014 18:19:00 -0000 [thread overview]
Message-ID: <CADPb22QX-Ey-pGiTHDNpGFQVvZfpKZsmNfkFf5kOEaNL_PzeXQ@mail.gmail.com> (raw)
In-Reply-To: <544A6CB6.4080500@redhat.com>
On Fri, Oct 24, 2014 at 8:13 AM, Pedro Alves <palves@redhat.com> wrote:
> On 10/17/2014 08:49 PM, Doug Evans wrote:
>> Alas our use of thread ids is a bit, umm, confusing
>> (in more ways than one! :-().
>> Here, it's not guaranteed that ptid.lwp has something useful,
>> and it may be that the target uses ptid.tid instead.
>>
>> See python/py-infthread.c:thpy_get_ptid.
>> I think we should make that non-static and use that here.
>> IOW, pass the whole ptid_t to the event.
>
> How about using GDB's own unique thread number instead of
> the ptid? Doesn't seem to be any reason to expose
> target-side details or identifiers here?
Yeah, I thought of that.
We already expose ptids.
Plus one can look at them as just an id: something you receive, pass
around, and print.
But I don't have a strong preference, other than consistency.
Whatever we pick we need to use it for everything (barring compelling
reasons to do otherwise).
Setting aside concerns of exposing target details,
are there other technical reasons to prefer one over the other?
Here's a question that comes to mind.
Internally we use ptids and not thread numbers.
Do any of the reasons for doing so carry over to the Python API?
[While IWBN if internal and external APIs used the same id everywhere,
I'm more concerned with more technical details of picking one over the
other. E.g., Thread IDs are more transient, they get recycled more
often, but technically ptids can get recycled too.]
next prev parent reply other threads:[~2014-11-06 18:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 17:32 [PATCH v6] " Nick Bull
2014-09-24 14:05 ` Robert O'Callahan
2014-09-25 10:14 ` Phil Muldoon
2014-10-01 9:50 ` Nick Bull
2014-10-01 17:52 ` Pedro Alves
2014-10-17 16:26 ` [PATCH v7] " Nick Bull
2014-10-17 19:49 ` Doug Evans
2014-10-17 20:00 ` Doug Evans
2014-10-22 12:40 ` [PATCH v8] " Nick Bull
2014-11-17 18:13 ` Nick Bull
2014-11-17 21:25 ` Doug Evans
2014-11-18 16:37 ` Nick Bull
2014-11-20 0:21 ` Doug Evans
2014-11-20 10:36 ` Nick Bull
2014-12-02 19:20 ` Doug Evans
2014-12-04 10:45 ` Nick Bull
2014-12-15 8:33 ` Yao Qi
2014-10-24 15:14 ` [PATCH v7] " Pedro Alves
2014-11-06 18:19 ` Doug Evans [this message]
2014-11-07 12:21 ` Pedro Alves
2014-11-07 17:04 ` Doug Evans
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=CADPb22QX-Ey-pGiTHDNpGFQVvZfpKZsmNfkFf5kOEaNL_PzeXQ@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=nicholaspbull@gmail.com \
--cc=palves@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