public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: "Mangold\, Kevin" <kevin.mangold@siemens.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] [PR gdb/23454] thread number ID changes, when using rr record/replay
Date: Thu, 09 Aug 2018 20:42:00 -0000	[thread overview]
Message-ID: <87bmab6zlw.fsf@tromey.com> (raw)
In-Reply-To: <DEC42497C6A9034CAD2685219EF0AD2CF57CCB@DEFTHW99EH4MSX.ww902.siemens.net>	(Kevin Mangold's message of "Mon, 30 Jul 2018 13:10:01 +0000")

>>>>> "Kevin" == Mangold, Kevin <kevin.mangold@siemens.com> writes:

Kevin> This commit enables the ability to use gdb with rr and rr in eclipse.
Kevin> Fixes Bug 23454 on Bugzilla
Kevin> When replaying a thread creation gdb increments the thread ID number
Kevin> shown with 'info threads'. This caused different thread ID's,
Kevin> while replaying the same thread exectuion.
Kevin> In thread.c, we made a change that looks, if this thread already
Kevin> got a number and if yes, the thread gets the old number assigned.
Kevin> When using in eclipse, we have to manually increment the
Kevin> 'highest_thread_num' once. Therefore the command:
Kevin> 'rr_running_under_eclipse' was added, which can be used 'once'
Kevin> to set the correct highest_thread_num.

If I understand properly, what's going on here is that with rr, you can
reverse-step past the creation of a thread.  Then, when replaying again,
the thread is recreated but with a new thread id.  However, you would
like gdb to preserve the thread id.

I think preserving the thread id makes a lot of sense.  However, I don't
think a new magic command like this is the way to go about it.

Would it be possible to record some pertinent information about a thread
when stepping backward, and then maintain a map that is used to reassign
the old thread id when the thread is recreated when moving forward?

Tom

      reply	other threads:[~2018-08-09 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 13:10 Mangold, Kevin
2018-08-09 20:42 ` Tom Tromey [this message]

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=87bmab6zlw.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevin.mangold@siemens.com \
    /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).