From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34298 invoked by alias); 9 Aug 2018 20:42:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 34286 invoked by uid 89); 9 Aug 2018 20:42:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=replay, sk:highest X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.250) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Aug 2018 20:42:49 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 5FE7B400D4961 for ; Thu, 9 Aug 2018 15:42:47 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id nrlUfFvyzbXuJnrlafefLv; Thu, 09 Aug 2018 15:42:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QPIJawfATadRQmgqW0GjyjkLm+r6QbUCJZzSLaKhcKE=; b=UnRGKtr8861zKtFcfT4hWrLHFd Ulz/3/HbhJKQ9FMjdw9FvQszuEg+WvNGuwdyh+FfzhRCc3RsRvmNt6XwFqexFBFbg/Ww3Y02PCDLw TlewltgUC3kAQb5PXCYfTt9fr; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:35688 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fnrlU-002hlG-CZ; Thu, 09 Aug 2018 15:42:36 -0500 From: Tom Tromey To: "Mangold\, Kevin" Cc: "gdb-patches\@sourceware.org" Subject: Re: [PATCH] [PR gdb/23454] thread number ID changes, when using rr record/replay References: Date: Thu, 09 Aug 2018 20:42:00 -0000 In-Reply-To: (Kevin Mangold's message of "Mon, 30 Jul 2018 13:10:01 +0000") Message-ID: <87bmab6zlw.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-08/txt/msg00239.txt.bz2 >>>>> "Kevin" == Mangold, Kevin 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