From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by sourceware.org (Postfix) with ESMTPS id 5A8CC3858C52 for ; Mon, 12 Jun 2023 19:36:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A8CC3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-77acb944bdfso302361039f.0 for ; Mon, 12 Jun 2023 12:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1686598591; x=1689190591; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=e5HEl83/KFXZU1B8yEKeO4Bf7ivc6qcjkQxFKBDSY+M=; b=BuiSj9pMXddA+WTslg+QGEJ5AkLEk9jJehkA43ODri3TYKCW0bW3Cre8PMuuBeHJpS uAAHySrCVdX99afMYF1BmMblvk93zAio+/YspMK+eC0i4GqBV0fxbI51zomFRfuzOfL8 xhjIweH5S2CeTE/IFe2U82IAD0OcKjp4zn6UseI/oNS/IeG76dgSocJyFfaKHTbCgVJM 88CpmvPI0jfD+0fZk1VJ6twUE9NaSIFtjAC6VvwPzAbTxf44gyUgM2R2+wqAXoZJNFAb i+8ZNhJGAtTiUazYbCF8iAbbeyxNUcgL+eXMVsD87RGCewyf2u/EIpnoP0AgCVbY9MAU BrFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686598591; x=1689190591; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e5HEl83/KFXZU1B8yEKeO4Bf7ivc6qcjkQxFKBDSY+M=; b=DYzQDsdPZGQXGCvmJpEVu5t7nEH+ZRl+9z+UWpX+Kxcul9L494mjn+uFvkpo5KSyaU zXg5Gos86bwBQJXZJhxSIJwA6Ehtwn148GxKpnb70ecAR7VVYbHZFQihKlxo/6NLxpgQ D8rYqtR5GpxN7j16VkAIPMT63HKA+9epsp2pS6roFN23oZONW/Yp61m5qtic6iR//e8R Y0bmSgCur/NDr60Nzaa7FZc8lLt2AjtcA0uFj4Tl1z2shvxLCPWXkF2W8fu/jWS05cAa /MvDBhMlMJeGsMWfJNjG5ZF4srZTphmsjz6TpWKy9r6S3Q09Q/pNfsz8JWNNrUXqf0UE hn0A== X-Gm-Message-State: AC+VfDyB0MzSCFF3s+v5Afbd6mnSBghq4IH9Bzf/2bYueMBFZzkxouEm zrt7G1x+FRyZueGQeNco4zDzurjgLG8bXUaa9nnQJQ== X-Google-Smtp-Source: ACHHUZ47lJ+bJMD0bqtoB9VRlxqmsbmqAiVXlVkL0o8kKQCKBY5Fe+PB/Wg220TSZPGvs0dEgOum+w== X-Received: by 2002:a6b:7a47:0:b0:776:fd07:3c96 with SMTP id k7-20020a6b7a47000000b00776fd073c96mr9636884iop.7.1686598591602; Mon, 12 Jun 2023 12:36:31 -0700 (PDT) Received: from localhost.localdomain (75-166-136-83.hlrn.qwest.net. [75.166.136.83]) by smtp.gmail.com with ESMTPSA id m12-20020a056638224c00b00418a5e0e93esm2938091jas.162.2023.06.12.12.36.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 12:36:31 -0700 (PDT) From: Tom Tromey Date: Mon, 12 Jun 2023 13:36:29 -0600 Subject: [PATCH 2/7] Reuse breakpoints more frequently in DAP MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230612-more-dap-v1-2-ad868f1a4cc0@adacore.com> References: <20230612-more-dap-v1-0-ad868f1a4cc0@adacore.com> In-Reply-To: <20230612-more-dap-v1-0-ad868f1a4cc0@adacore.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: The DAP breakpoint code tries to reuse a breakpoint when possible. Currently it uses the condition and the hit condition (aka ignore count) when making this determination. However, these attributes are just going to be reset anyway, so this patch changes the code to exclude these from the reuse decision. --- gdb/python/lib/gdb/dap/breakpoint.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/python/lib/gdb/dap/breakpoint.py b/gdb/python/lib/gdb/dap/breakpoint.py index 2cb8db68907..f15f905c5f3 100644 --- a/gdb/python/lib/gdb/dap/breakpoint.py +++ b/gdb/python/lib/gdb/dap/breakpoint.py @@ -85,9 +85,11 @@ def _set_breakpoints_callback(kind, specs, creator): breakpoint_map[kind] = {} result = [] for spec in specs: - keyspec = frozenset(spec.items()) - + # It makes sense to reuse a breakpoint even if the condition + # or ignore count differs, so remove these entries from the + # spec first. (condition, hit_condition) = _remove_entries(spec, "condition", "hitCondition") + keyspec = frozenset(spec.items()) if keyspec in saved_map: bp = saved_map.pop(keyspec) -- 2.40.1