From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=undo.io Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=undo.io Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2b5c231f842so5872401fa.2 for ; Thu, 29 Jun 2023 01:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=undo.io; s=google2; t=1688027815; x=1690619815; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IhKHnaKLE9eIoY24T0+IHGFoblfNQYRxPZZziM2p8DY=; b=O1z7BP6UhCDyPCzt3ZuGy8spPyuuLgNuM/F5T1I4m242NmudJ9vgWzdHyrcW/EAphg PlSa1P99WPP/r6EdqvpfD0TPmmPbqoiRA0gPa9bXi8XY4Jmb66GO8XrpkpXrGPJiALnq jMGtQpuzLFr7gcdvsZLas8wioksv0NGoi38zgJ/wq6WYWbm5y5OsDSLhiAIh3wgZXwNS pEhSNoPrZphXzYksDlp08Iliymgy9PaHdTiKaSDYPY3cTQjKVaB9vpvzdZwFLkinpPvj wKb8G+Dy0uOwLNyZcur/A7vMtiCEdNWnx0oBb2v2EvK1vwMnGtBopuBuA+QE4fpJSyun 5W3Q== 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) From: Magne Hov 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 List-Id: 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