public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Magne Hov <mhov@undo.io>
To: gdb-patches@sourceware.org
Cc: Magne Hov <mhov@undo.io>
Subject: [PATCH 0/2] Improve handling of thread numbers for reverse execution targets
Date: Thu, 29 Jun 2023 09:36:49 +0100	[thread overview]
Message-ID: <20230629083651.3145268-1-mhov@undo.io> (raw)

Hi,

This patchset improves the way thread numbers and thread-specific breakpoints
are handled for reverse execution targets:
- While navigating forwards and backwards in time threads should always be
  presented with the same thread number, regardless of whether they have
  previously been seen to exit.
- Thread-specific breakpoints must stay inserted when moving backwards in time
  even if the corresponding thread has terminated.

The builtin record targets don't support threads well, so I haven't been able to
test with them:
- target record-full does seem to record multiple threads, but it does not seem
  to present information about non-main threads at replay time.
- target record-btrace does not seem to let you view or select an exited thread,
  even after reversing past the thread exit.

GDB's test suite flagged these regressions, but they appear to be intermittent
between unpatched runs as well:
- gdb.base/step-over-syscall.exp
- gdb.threads/attach-many-short-lived-threads.exp
- gdb.threads/process-dies-while-handling-bp.exp

I have manually tested the info thread command and thread-specific breakpoints
with rr (https://rr-project.org) and UDB (https://undo.io), and the patches have
passed UDB's internal test suite.

I've already signed FSF agreement.

Magne Hov (2):
  gdb: keep record of thread numbers for reverse execution targets
  gdb: retain thread-specific breakpoints in reverse execution targets

 gdb/breakpoint.c | 18 +++++++++++++-----
 gdb/inferior.c   |  1 +
 gdb/inferior.h   |  7 +++++++
 gdb/thread.c     | 38 ++++++++++++++++++++++++++++++++++++--
 4 files changed, 57 insertions(+), 7 deletions(-)

-- 
2.25.1


             reply	other threads:[~2023-06-29  8:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29  8:36 Magne Hov [this message]
2023-06-29  8:36 ` [PATCH 1/2] gdb: keep record " Magne Hov
2023-06-29  9:01   ` Lancelot SIX
2023-06-29  9:38     ` Magne Hov
2023-06-29  8:36 ` [PATCH 2/2] gdb: retain thread-specific breakpoints in " Magne Hov
2023-07-07 16:24 ` [PATCH v2 0/2] Improve handling of thread numbers for " Magne Hov
2023-07-07 16:24   ` [PATCH v2 1/2] gdb: keep record " Magne Hov
2023-07-13 12:21     ` Bruno Larsen
2023-09-19 16:33     ` Tom Tromey
2023-09-20 16:42       ` Pedro Alves
2023-09-20 17:00         ` Magne Hov
2023-09-20 17:13     ` Pedro Alves
2023-07-07 16:24   ` [PATCH v2 2/2] gdb: retain thread-specific breakpoints in " Magne Hov
2023-07-13 12:22     ` Bruno Larsen
2023-08-18 14:27   ` [PING][PATCH v2 0/2] Improve handling of thread numbers for " Magne Hov
2023-09-18 11:38     ` Magne Hov
2023-09-19 16:34   ` [PATCH " 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=20230629083651.3145268-1-mhov@undo.io \
    --to=mhov@undo.io \
    --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).