From: Christian Biesinger <cbiesinger@google.com>
To: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Cc: gdb-patches <gdb-patches@sourceware.org>,
Pedro Alves <palves@redhat.com>
Subject: Re: [PATCH 1/2] gdb: introduce 'all_non_exited_process_targets' and 'switch_to_target_no_thread'
Date: Tue, 12 May 2020 17:29:00 -0500 [thread overview]
Message-ID: <CAPTJ0XHw7vqhEBT8wwrm1Ei-t0tos5akxZPc5kUFDiKEaWJmuQ@mail.gmail.com> (raw)
In-Reply-To: <1588520232-2147-1-git-send-email-tankut.baris.aktemur@intel.com>
On Sun, May 3, 2020 at 10:37 AM Tankut Baris Aktemur via Gdb-patches
<gdb-patches@sourceware.org> wrote:
> @@ -83,3 +84,27 @@ process_stratum_target::has_execution (inferior *inf)
> through hoops. */
> return inf->pid != 0;
> }
> +
> +/* See process-stratum-target.h. */
> +
> +std::set<process_stratum_target *>
> +all_non_exited_process_targets ()
> +{
> + std::set<process_stratum_target *> targets;
> + for (inferior *inf : all_non_exited_inferiors ())
> + targets.insert (inf->process_target ());
> +
> + return targets;
Instead of creating a new set, it seems like it would be a lot more
efficient to just wrap the all_non_exited_inferiors() iterator and
return it->process_target(). What do you think?
Christian
next prev parent reply other threads:[~2020-05-12 22:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-03 15:37 Tankut Baris Aktemur
2020-05-12 22:29 ` Christian Biesinger [this message]
2020-05-13 8:26 ` Aktemur, Tankut Baris
2020-05-13 18:43 ` Christian Biesinger
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=CAPTJ0XHw7vqhEBT8wwrm1Ei-t0tos5akxZPc5kUFDiKEaWJmuQ@mail.gmail.com \
--to=cbiesinger@google.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=tankut.baris.aktemur@intel.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).