Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Matthieu Longo <matthieu.longo@arm.com>
To: <gdb-patches@sourceware.org>
Cc: Luis Machado <luis.machado@amd.com>,
	Luis Machado <luis.machado.foss@gmail.com>,
	Simon Marchi <simark@simark.ca>,
	"Thiago Jung Bauermann" <thiago.bauermann@linaro.org>,
	Matthieu Longo <matthieu.longo@arm.com>
Subject: [PATCH v1 0/2] gdb: fix for bug 31207
Date: Tue, 28 Jul 2026 15:33:15 +0100	[thread overview]
Message-ID: <20260728143317.245389-1-matthieu.longo@arm.com> (raw)

This patch series contains:
- a refactoring suggested by Simon Marchi <simark@simark.ca> in [1] patch 02/10.
- a fix for https://sourceware.org/bugzilla/show_bug.cgi?id=31207.

Those 2 patches were extracted from a previous patch series [1], in order to give more visibility and focus on that fix.

Following up the suggestions of Simon,
1. 'info proc mappings' will print before the thread-group leader exits:
    process 814
  and after the thread-group leader exited:
    process 814 [Note: information where gathered from LWP 816 as the thread-group leader (LWP=814) already exited.]

2. the code selecting the PTID inside was moved to get_process_reference_ptid().
3. a new test in gdb.threads checks that the header is emitted correctly before and after the exit of the thread-group leader.

Regards,
Matthieu

[1]: https://inbox.sourceware.org/gdb-patches/20260707154900.94542-1-matthieu.longo@arm.com/


Matthieu Longo (2):
  gdb: rename any_thread_of_inferior to any_non_exited_thread_of_inferior
  gdb: rely on the first non-exited thread TPID when reading Linux procfs files

 gdb/gdbthread.h                               |  4 +-
 gdb/inferior.c                                | 18 +++-
 gdb/inferior.h                                | 11 +++
 gdb/linux-fork.c                              | 10 +--
 gdb/linux-tdep.c                              | 90 +++++++++++++------
 gdb/mi/mi-main.c                              |  4 +-
 gdb/remote.c                                  |  4 +-
 ...access-procfs-while-thread-leader-exited.c | 48 ++++++++++
 ...cess-procfs-while-thread-leader-exited.exp | 78 ++++++++++++++++
 gdb/thread.c                                  |  2 +-
 gdb/top.c                                     |  2 +-
 11 files changed, 227 insertions(+), 44 deletions(-)
 create mode 100644 gdb/testsuite/gdb.threads/access-procfs-while-thread-leader-exited.c
 create mode 100644 gdb/testsuite/gdb.threads/access-procfs-while-thread-leader-exited.exp

-- 
2.55.0


             reply	other threads:[~2026-07-28 14:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 14:33 Matthieu Longo [this message]
2026-07-28 14:33 ` [PATCH v1 1/2] gdb: rename any_thread_of_inferior to any_non_exited_thread_of_inferior Matthieu Longo
2026-07-28 14:33 ` [PATCH v1 2/2] gdb: rely on the first non-exited thread TPID when reading Linux procfs files Matthieu Longo

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=20260728143317.245389-1-matthieu.longo@arm.com \
    --to=matthieu.longo@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado.foss@gmail.com \
    --cc=luis.machado@amd.com \
    --cc=simark@simark.ca \
    --cc=thiago.bauermann@linaro.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