Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 0/4] Remove some uses of iterate_over_inferiors
Date: Fri, 20 Sep 2019 02:16:00 -0000	[thread overview]
Message-ID: <84bd60f3-2a9f-ac45-cf6e-f2823ecca44c@simark.ca> (raw)
In-Reply-To: <20190919212825.7586-1-tom@tromey.com>

On 2019-09-19 5:28 p.m., Tom Tromey wrote:
> This series removes some uses of iterate_over_inferiors in favor of
> foreach-style iteration.  I find the latter simpler both to debug and
> to read.
> 
> There are more instances of iterate_over_inferiors, and other
> iterate_over_* functions -- this series is just a starter to see
> whether others agree, so let me know what you think.
> 
> Tested on x86-64 Fedora by the buildbot.
> 
> Tom
> 
> 

Hi Tom,

This all looks good to me, I agree with the direction.

I was just wondering, why did you choose to use all_inferiors_safe in all
these cases, rather than all_inferiors?  At first sight, they don't seem
to be cases where an inferior can be deleted.  Is it maybe that it's
simpler to just use the "safe" version and there's no disadvantage to it?

Simon


  parent reply	other threads:[~2019-09-20  2:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 21:28 Tom Tromey
2019-09-19 21:28 ` [PATCH 1/4] Use foreach in gdbpy_inferiors Tom Tromey
2019-09-19 21:28 ` [PATCH 3/4] Don't use iterate_over_inferiors in target.c Tom Tromey
2019-09-19 21:28 ` [PATCH 4/4] Remove a use of iterate_over_threads from mi-main.c Tom Tromey
2019-09-19 21:28 ` [PATCH 2/4] Don't use iterate_over_inferiors in top.c Tom Tromey
2019-09-20  2:16 ` Simon Marchi [this message]
2019-09-20 14:02   ` [PATCH 0/4] Remove some uses of iterate_over_inferiors Tom Tromey
2020-01-15 19:12 Simon Marchi
2020-01-16 16:23 ` Tom Tromey
2020-01-16 22:46   ` Simon Marchi

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=84bd60f3-2a9f-ac45-cf6e-f2823ecca44c@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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