This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [PR gdb/23454] thread number ID changes, when using rr record/replay


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]