From: Tom Tromey <tom@tromey.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Give thread names in thread events, give Ada task names in more output.
Date: Wed, 05 Jun 2019 13:28:00 -0000 [thread overview]
Message-ID: <87pnnsi2jz.fsf@tromey.com> (raw)
In-Reply-To: <1559684425.1454.52.camel@skynet.be> (Philippe Waroquiers's message of "Tue, 04 Jun 2019 23:40:25 +0200")
>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
>> Are there spots calling target_pid_to_str that do not want to call the
>> new function?
Philippe> We have different "spot kinds" calling target_pid_to_str.
Philippe> Some spots have a thread_info*, they get the ptid from this thread_info
Philippe> to call target_pid_to_str. These are trivial to convert.
Philippe> Some spots have just a ptid. Calling thread_target_id_str implies to
Philippe> convert the ptid to a thread_info*. This can return a null ptr, and so
Philippe> could lead to a problem.
Philippe> Maybe we could define a new function such as:
Philippe> target_pid_to_thr_id_str (ptid)
Philippe> that tries to convert ptid to a thread_info*.
Philippe> If it finds one, then it returns thread_target_id_str (th)
Philippe> otherwise it returns target_pid_to_str (ptid).
Philippe> This should be a relatively mechanical and not risky change, but we
Philippe> have about 200 calls to target_pid_to_str in various user messages
Philippe> and (mostly) debug info.
Philippe> What do you think ?
I think when I wrote that line, I hadn't yet appreciated that the patch
was just exposing a previously private function. So, while it may still
make sense to switch other calls to use it, I don't think it is a
requirement for this patch.
Tom
next prev parent reply other threads:[~2019-06-05 13:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-18 18:23 Philippe Waroquiers
2019-05-18 19:03 ` Eli Zaretskii
2019-05-19 12:41 ` Philippe Waroquiers
2019-05-19 13:32 ` Eli Zaretskii
2019-06-03 20:02 ` Tom Tromey
2019-06-04 21:40 ` Philippe Waroquiers
2019-06-05 13:28 ` Tom Tromey [this message]
2019-06-05 9:02 ` Pedro Alves
2019-06-05 22:24 ` Philippe Waroquiers
2019-06-08 15:45 ` Philippe Waroquiers
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=87pnnsi2jz.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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