From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QbdNHMJCnWQAABEAWB0awg (envelope-from ) for ; Thu, 29 Jun 2023 04:37:22 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=n03Svxlb; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 656DD1E0BB; Thu, 29 Jun 2023 04:37:22 -0400 (EDT) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 542A11E00F for ; Thu, 29 Jun 2023 04:37:20 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EFA1A3858414 for ; Thu, 29 Jun 2023 08:37:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFA1A3858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1688027840; bh=IhKHnaKLE9eIoY24T0+IHGFoblfNQYRxPZZziM2p8DY=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=n03Svxlba3sBgz6SDqoz/VfoaeloPl1l7lyN16cOY0GfYNOVu7lBzb0H6yiUgqwia hK+9vzD8TxY6XgO6eZnelKs265KgiWhQRk4XkfgZmEnm4Lkf/1sQsFHaMCthOnjgr6 9WZGExaN/NMDUMfhhYdAqGL39MrB+kVUL4pf+2Vs= Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 826573858D35 for ; Thu, 29 Jun 2023 08:36:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 826573858D35 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2b5c231f842so5872401fa.2 for ; Thu, 29 Jun 2023 01:36:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688027815; x=1690619815; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IhKHnaKLE9eIoY24T0+IHGFoblfNQYRxPZZziM2p8DY=; b=Yw9QpxtiudleIwEnqg7ZZWp30WETZ1L6SI2Dv2/tEqv/b+6YP3dx+dI0OLd57hUXv6 rAVvKksZNyBe4RcEYt+IDsMB1QKDmSiXkAq26L8ONftgVacUyLAOOl8ETg8e3wfEVyPa Zb54VGUiSyK3J7+1J2JtKAdWHEDK8wtMsw28pljZawrPq3tYhWVfXHGj7M78SbhQ0eUk juboh7qAg+1NHTuyJ9JBiJWqC+TnbLna7D5YN5snRz6SPmlAzyGdC1cY05H/KxKeKS96 ZP4z30/rbmpGAuooKdoTMyBRbDTdeNdhyB/JO8cWdFqkEbdgcxPIcblYotjKLAT0VMvA CyfA== X-Gm-Message-State: ABy/qLYqVDibDi3V/PKPkcm6xkYFlAwI17njaLGP9rBCVAJqwuEc9HbD SEI8Gf2QC0JdVhBExX2y2Qq3oyABJkgAgsfX/AwNqqo46Dxo+wRxyoYVOdEKJq36Db8a4F8LJDf lP6iNf95PH6/1sfGtQCEVVqZpiRVmWzN7hvnjZiN9Z5c8406ftkItNpQoNtlRaqHDUE+IuWw= X-Google-Smtp-Source: APBJJlEHTN/YT7BH2aXY34mB6+GOtTFhY9rP8mXVD4Yy0TKIApCABjxZRfO0FhXiMYaDEEZdNIHhoA== X-Received: by 2002:a2e:3606:0:b0:2b6:cb9b:8fe4 with SMTP id d6-20020a2e3606000000b002b6cb9b8fe4mr328101lja.22.1688027814816; Thu, 29 Jun 2023 01:36:54 -0700 (PDT) Received: from sbrinz-thinkpad.undoers.io (ip-185-104-136-31.ptr.icomera.net. [185.104.136.31]) by smtp.gmail.com with ESMTPSA id g11-20020a7bc4cb000000b003fbab76165asm5195747wmk.48.2023.06.29.01.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 01:36:54 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Magne Hov Subject: [PATCH 0/2] Improve handling of thread numbers for reverse execution targets Date: Thu, 29 Jun 2023 09:36:49 +0100 Message-Id: <20230629083651.3145268-1-mhov@undo.io> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Magne Hov via Gdb-patches Reply-To: Magne Hov Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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