Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v1 0/2] gdb: fix for bug 31207
@ 2026-07-28 14:33 Matthieu Longo
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Matthieu Longo @ 2026-07-28 14:33 UTC (permalink / raw)
  To: gdb-patches
  Cc: Luis Machado, Luis Machado, Simon Marchi, Thiago Jung Bauermann,
	Matthieu Longo

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-28 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-28 14:33 [PATCH v1 0/2] gdb: fix for bug 31207 Matthieu Longo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox