From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QcgECPIs5mReqAkAWB0awg (envelope-from ) for ; Wed, 23 Aug 2023 11:59:46 -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=aOm8u8WT; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 17E851E0C2; Wed, 23 Aug 2023 11:59:46 -0400 (EDT) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id EEE351E092 for ; Wed, 23 Aug 2023 11:59:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9E0493853D06 for ; Wed, 23 Aug 2023 15:59:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E0493853D06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692806383; bh=AMpHf2Re4GhL+l+KR3idUV24K4/QGUa2y049kSBOgAs=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=aOm8u8WT56w2nwOk2f9sDhpnMOye2b+eEvo4+v+O5SqrOdwvRzD8fAP5hmYr6ai0y EM4DNA2svsAOTmnDk7D0O1s9dbbjXv8iHTI0bnCYAom5r9uF+RofM483vckAD2pObu u5aCv3DwJ/j6CtCIwOrelaymVG/csN0p3dRiSU5k= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 124C53858401 for ; Wed, 23 Aug 2023 15:59:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 124C53858401 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-93-TDRprB7YOa-zn5dHZhv5JQ-1; Wed, 23 Aug 2023 11:59:22 -0400 X-MC-Unique: TDRprB7YOa-zn5dHZhv5JQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-993eeb3a950so398096566b.2 for ; Wed, 23 Aug 2023 08:59:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692806360; x=1693411160; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AMpHf2Re4GhL+l+KR3idUV24K4/QGUa2y049kSBOgAs=; b=hj1gd4m4UJQYee8Zv/LVByaPtv7/jxtkwqlS8xqre6a4oPlOTUuGXQjvik42eMygyR zsV416g2+sFQ4yFPB+8pEMTcQCn/leVyHAWtV7eO3umc8Had9M1NQGud8JYydovNea4T t+2whVczfvw/5OcignJB66sdm8f9Qz6/8KtV7a6OMbQB2AbPPqNiIHkSLbLj6MN+aCd2 qLAHXtCy+yfXdH70Yx0mhmspW/LiKZum/STiB+cQI5HwJGY8GDnYwF5uEwTBWxtPIeW8 yUdaAygArX9bUmotdRAXYYW1VmT55txOu9h1uWpPZYB9QIjYpKwHcBDiAFtxwUDgQnRY d+BA== X-Gm-Message-State: AOJu0YwYrRsSCmf0NXQziP6exyedWcnrHFBfL5gHO2uslCNV766OLaIJ AcYes/8/2/9oRKWjSjnzlSl7AXaVM2H6Q7PWNlf6SrUDlpFiAJjn5doYbfnCnLhheYvA6GBrRIV cV7AOw0K4JClyle4xn9+pNEjrtl6+fktQyLjGcoBy5P6cUXylmkodKbnT02zLptL78vqh/gv00J 3p1zZi2Q== X-Received: by 2002:a17:907:801f:b0:99b:d599:5086 with SMTP id ft31-20020a170907801f00b0099bd5995086mr8791788ejc.75.1692806360414; Wed, 23 Aug 2023 08:59:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlkvXJBTV2N7+woQcv/bCicFs0+5DRB+xyDzz1D/EnG4qvDHJ8K5r+UQvUlmvhKmFo1eCaZA== X-Received: by 2002:a17:907:801f:b0:99b:d599:5086 with SMTP id ft31-20020a170907801f00b0099bd5995086mr8791773ejc.75.1692806360070; Wed, 23 Aug 2023 08:59:20 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id y22-20020a17090614d600b009a1c05bd672sm2373322ejc.127.2023.08.23.08.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 08:59:19 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv4 00/10] thread-specific breakpoints in just some inferiors Date: Wed, 23 Aug 2023 16:59:05 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This series makes it so that GDB will only insert thread-specific and inferior-specific breakpoints into the program space in which the thread or inferior is running. This means that threads or inferiors running in different program spaces will no longer hit these breakpoints at all. Earlier versions of this series only handled thread-specific breakpoints as the inferior-specific breakpoint support had not been merged. In v4 this is no longer the case and both types of breakpoint are now handled. --- In v4: - Big update, this series now handles thread-specific and inferior-specific breakpoints. In v3: - Rebased on to current upstream/master, this includes all Simon's recent breakpoint changes. Retested with no regressions seen. In v2: - Rebased on current upstream/master and retested, - No changes to code or docs. --- Andrew Burgess (10): gdb: create_breakpoint: add asserts and additional comments gdb: create_breakpoint: asserts relating to extra_string/parse_extra gdb: change 'if' to gdb_assert in update_dprintf_command_list gdb: build dprintf commands just once in code_breakpoint constructor gdb: don't display inferior list for pending breakpoints gdb: parse pending breakpoint thread/task immediately gdb: don't set breakpoint::pspace for in create_breakpoint gdb: remove breakpoint_re_set_one gdb: remove tracepoint_probe_create_sals_from_location_spec gdb: only insert thread-specific breakpoints in the relevant inferior gdb/Makefile.in | 2 + gdb/NEWS | 11 + gdb/ada-lang.c | 6 +- gdb/break-catch-throw.c | 6 +- gdb/break-cond-parse.c | 425 ++++++++++ gdb/break-cond-parse.h | 49 ++ gdb/breakpoint.c | 759 +++++++++--------- gdb/breakpoint.h | 101 ++- gdb/testsuite/gdb.ada/tasks.exp | 6 +- gdb/testsuite/gdb.base/condbreak.exp | 20 +- gdb/testsuite/gdb.base/pending.exp | 23 +- gdb/testsuite/gdb.linespec/explicit.exp | 4 +- gdb/testsuite/gdb.mi/mi-dprintf-pending.exp | 3 +- gdb/testsuite/gdb.mi/new-ui-bp-deleted.exp | 8 +- .../gdb.mi/user-selected-context-sync.exp | 4 +- .../gdb.multi/bp-thread-specific.exp | 7 +- .../gdb.multi/inferior-specific-bp.exp | 16 +- .../gdb.multi/multi-target-continue.exp | 2 +- .../gdb.multi/multi-target-ping-pong-next.exp | 4 +- .../gdb.multi/pending-bp-del-inferior.c | 28 + .../gdb.multi/pending-bp-del-inferior.exp | 214 +++++ gdb/testsuite/gdb.multi/pending-bp-lib.c | 22 + gdb/testsuite/gdb.multi/pending-bp.c | 66 ++ gdb/testsuite/gdb.multi/pending-bp.exp | 336 ++++++++ gdb/testsuite/gdb.multi/tids.exp | 6 +- .../gdb.threads/del-pending-thread-bp-lib.c | 22 + .../gdb.threads/del-pending-thread-bp.c | 85 ++ .../gdb.threads/del-pending-thread-bp.exp | 108 +++ 28 files changed, 1873 insertions(+), 470 deletions(-) create mode 100644 gdb/break-cond-parse.c create mode 100644 gdb/break-cond-parse.h create mode 100644 gdb/testsuite/gdb.multi/pending-bp-del-inferior.c create mode 100644 gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp create mode 100644 gdb/testsuite/gdb.multi/pending-bp-lib.c create mode 100644 gdb/testsuite/gdb.multi/pending-bp.c create mode 100644 gdb/testsuite/gdb.multi/pending-bp.exp create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp.c create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp.exp base-commit: cdb090c88b4ebf6f728a000d1ee73d9bdee9ebb3 -- 2.25.4