public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix "attach" infinite loop
@ 2023-10-03 17:56 Tom Tromey
  2023-10-03 17:56 ` [PATCH 1/3] Minor cleanup in linux_proc_attach_tgid_threads Tom Tromey
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Tom Tromey @ 2023-10-03 17:56 UTC (permalink / raw)
  To: gdb-patches

A user noticed that if you strace the non-main thread of a program,
then if you try to attach gdb to that program, gdb will enter an
infinite loop.

This series fixes this bug, but has a couple extra small cleanup
patches as well.

Regression tested on x86-64 Fedora 36.

---
Tom Tromey (3):
      Minor cleanup in linux_proc_attach_tgid_threads
      Use gdb_dir_up in linux_proc_attach_tgid_threads
      Bail out of "attach" if a thread cannot be traced

 gdb/linux-nat.c                          |  49 +++++++++++----
 gdb/nat/linux-procfs.c                   |  11 ++--
 gdb/testsuite/gdb.base/traced-thread.c   | 105 +++++++++++++++++++++++++++++++
 gdb/testsuite/gdb.base/traced-thread.exp |  54 ++++++++++++++++
 gdbserver/linux-low.cc                   |  15 ++++-
 5 files changed, 214 insertions(+), 20 deletions(-)
---
base-commit: 1c9b44fe07569b6ed99557faa87d5b1c21413fbf
change-id: 20231003-attach-bug-ec9c00e86086

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


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

end of thread, other threads:[~2024-01-02 19:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03 17:56 [PATCH 0/3] Fix "attach" infinite loop Tom Tromey
2023-10-03 17:56 ` [PATCH 1/3] Minor cleanup in linux_proc_attach_tgid_threads Tom Tromey
2023-10-04  1:29   ` Simon Marchi
2023-10-03 17:56 ` [PATCH 2/3] Use gdb_dir_up " Tom Tromey
2023-10-04  1:30   ` Simon Marchi
2023-10-03 17:56 ` [PATCH 3/3] Bail out of "attach" if a thread cannot be traced Tom Tromey
2023-10-04  1:29   ` Simon Marchi
2023-10-04 14:14     ` Tom Tromey
2023-10-04 17:38       ` Simon Marchi
2023-12-01 17:41 ` [PATCH 0/3] Fix "attach" infinite loop Tom Tromey
2023-12-04 14:25   ` Luis Machado
2023-12-05 19:27     ` Tom Tromey
2023-12-15 19:33       ` Tom Tromey
2023-12-18  9:50         ` Luis Machado
2023-12-18 11:33           ` Luis Machado
2023-12-18 14:30             ` Tom Tromey
2023-12-18 15:10               ` Luis Machado
2024-01-02 19:14                 ` Carl Love

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).