Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 0/2] Remove for_each_thread
Date: Wed, 13 May 2026 11:32:57 -0600	[thread overview]
Message-ID: <20260513-remove-for-each-v1-0-8793bd79f781@adacore.com> (raw)

As mentioned elsewhere on the list, here is a short series to remove
for_each_thread.

My view is that in most cases using 'foreach' and an iterator is
preferable to using a callback-style iteration function.  An explicit
loop is clearer and often involves less code.

This series removes for_each_thread.  Note I left the NetBSD-specific
variant alone, as I can't build or test this.

Regression tested on x86-64 Fedora 43.

Signed-off-by: Tom Tromey <tromey@adacore.com>
---
Tom Tromey (2):
      Use bool in continue_1
      Remove for_each_thread

 gdb/breakpoint.c |  6 ++----
 gdb/gdbthread.h  |  9 ---------
 gdb/infcmd.c     | 59 +++++++++++++++++++++++++++-----------------------------
 gdb/inferior.h   |  2 +-
 gdb/mi/mi-main.c | 34 +++++++++++++++-----------------
 gdb/thread.c     |  9 ---------
 6 files changed, 47 insertions(+), 72 deletions(-)
---
base-commit: b301725d35c1d6d80649180dcad1d3bdc42de862
change-id: 20260513-remove-for-each-1d12c2c85b53

Best regards,
-- 
Tom Tromey <tromey@adacore.com>


             reply	other threads:[~2026-05-13 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 17:32 Tom Tromey [this message]
2026-05-13 17:32 ` [PATCH 1/2] Use bool in continue_1 Tom Tromey
2026-05-14 14:00   ` Simon Marchi
2026-05-13 17:32 ` [PATCH 2/2] Remove for_each_thread Tom Tromey
2026-05-14 14:13   ` Simon Marchi
2026-05-14 17:48     ` Tom Tromey
2026-07-22 18:21 ` [PATCH 0/2] " Tom Tromey

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=20260513-remove-for-each-v1-0-8793bd79f781@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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