From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/3] Per-inferior thread list, multi-target prep
Date: Mon, 01 Oct 2018 10:32:00 -0000 [thread overview]
Message-ID: <20181001103252.5150-1-palves@redhat.com> (raw)
Here's another chunk split out from my multi-target branch (on
github). (It's the chunk that I mentioned would be next at the
Cauldron's multi-core BoF.)
Patch #3 is the real deal. See its commit log for the full
description, but the gist is that it makes each inferior have its own
thread list, and replaces the ALL_THREADS / ALL_NON_EXITED_THREADS /
ALL_INFERIORS macros with (C++20-like) ranges and iterators, such that
you can instead naturaly iterate over threads/inferiors using
range-for, like e.g,.:
// all threads, including THREAD_EXITED threads.
for (thread_info *tp : all_threads ())
{ .... }
// all non-exited threads.
for (thread_info *tp : all_non_exited_threads ())
{ .... }
// all non-exited threads of INF inferior.
for (thread_info *tp : inf->non_exited_threads ())
{ .... }
Patches #1 and #2 fix latent problems exposed by patch #3.
Pedro Alves (3):
Avoid find_thread_ptid with null_ptid
Fix follow_exec latent problem
Per-inferior thread list, thread ranges/iterators, down with
ALL_THREADS, etc.
gdb/Makefile.in | 1 +
gdb/breakpoint.c | 7 +-
gdb/btrace.c | 4 +-
gdb/cli/cli-interp.c | 4 +-
gdb/common/filtered-iterator.h | 87 +++++++++++
gdb/common/safe-iterator.h | 93 +++++++++++
gdb/corelow.c | 6 -
gdb/darwin-nat.c | 10 +-
gdb/fbsd-nat.c | 21 +--
gdb/fbsd-tdep.c | 6 +-
gdb/fork-child.c | 7 +-
gdb/gdbarch-selftests.c | 2 +-
gdb/gdbthread.h | 91 +++++++----
gdb/infcmd.c | 69 +++-----
gdb/inferior-iter.h | 117 ++++++++++++++
gdb/inferior.c | 136 ++++++----------
gdb/inferior.h | 83 +++++++---
gdb/inflow.c | 6 +-
gdb/infrun.c | 187 +++++++++-------------
gdb/linux-nat.c | 43 +++--
gdb/linux-tdep.c | 6 +-
gdb/linux-thread-db.c | 8 +-
gdb/mi/mi-interp.c | 60 +++----
gdb/mi/mi-main.c | 5 +-
gdb/nto-procfs.c | 2 -
gdb/python/py-inferior.c | 4 +-
gdb/record-btrace.c | 72 +++------
gdb/record-full.c | 4 +-
gdb/regcache.c | 3 -
gdb/remote-sim.c | 3 -
gdb/remote.c | 75 +++------
gdb/target.c | 8 +-
gdb/thread-iter.c | 101 ++++++++++++
gdb/thread-iter.h | 311 ++++++++++++++++++++++++++++++++++++
gdb/thread.c | 346 ++++++++++++-----------------------------
gdb/tid-parse.c | 12 +-
gdb/tui/tui-interp.c | 4 +-
gdb/x86-bsd-nat.c | 14 +-
38 files changed, 1211 insertions(+), 807 deletions(-)
create mode 100644 gdb/common/filtered-iterator.h
create mode 100644 gdb/common/safe-iterator.h
create mode 100644 gdb/inferior-iter.h
create mode 100644 gdb/thread-iter.c
create mode 100644 gdb/thread-iter.h
--
2.14.4
next reply other threads:[~2018-10-01 10:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 10:32 Pedro Alves [this message]
2018-10-01 10:32 ` [PATCH 1/3] Avoid find_thread_ptid with null_ptid Pedro Alves
2018-10-01 15:54 ` Tom Tromey
2018-10-02 17:08 ` Pedro Alves
2018-10-02 21:14 ` Tom Tromey
2018-10-01 10:33 ` [PATCH 2/3] Fix follow_exec latent problem Pedro Alves
2018-10-01 10:33 ` [PATCH 3/3] Per-inferior thread list, thread ranges/iterators, down with ALL_THREADS, etc Pedro Alves
2018-10-01 16:33 ` John Baldwin
2018-10-02 13:21 ` Pedro Alves
2018-10-03 17:34 ` John Baldwin
2018-10-04 19:16 ` Pedro Alves
2018-10-01 17:12 ` Tom Tromey
2018-10-03 12:12 ` Pedro Alves
2018-11-22 16:28 ` [PATCH 0/3] Per-inferior thread list, multi-target prep Pedro Alves
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=20181001103252.5150-1-palves@redhat.com \
--to=palves@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).