From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by sourceware.org (Postfix) with ESMTPS id C79CD3857377 for ; Mon, 16 May 2022 18:41:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C79CD3857377 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f41.google.com with SMTP id j25so20684161wrc.9 for ; Mon, 16 May 2022 11:41:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GzduEQorTMw02YUftQEP0r9UZtnD8+XiRBb/yMpa91I=; b=aYeXUYu8aE2vBkVVtf+CWR1AZJcoqbrLWqu3PsEL0WwXyJsOsE9pPcoImse4WbO6gB y2VgQ1uogJk5QEDn6kHduFAJWSi4YujJK2QLcpcpUshCBs2C8oe0sMjgpO1mcV1JbcAR vpy1yNkba1Jw/LSvovxWs+h1qTubIFs3YoThRgmqnxm975F/k4Aij3dQXEQwbLKtP1D7 uEUb7fto0inHU1Ut0dshqkuZj12PTKOuAjkjlWyWIMp2d6zmnKSVu6r842Bp4oGC6NiC Le1pdkwGiKkD8heDQton4iWKxBcuQgkL+IbdCiQi+G8LcDK/MthdE7VLgc3NnrAOkZO/ Q6Fg== X-Gm-Message-State: AOAM532HSWQhDjZzsHwb0AU7R6j145I8ZtojXSBDX4rYVMX7LKaIt3U9 9YLziSDtxAMs8W/odAHptx64/wcdpro= X-Google-Smtp-Source: ABdhPJyCGy4mt6XjFhP7q9krM/lbKEHVYwPy35cBtW+7810SRS8+NdIO9kAK3uFDiMpRD6pB21wbUQ== X-Received: by 2002:a5d:6488:0:b0:203:b628:70d2 with SMTP id o8-20020a5d6488000000b00203b62870d2mr15415227wri.83.1652726475811; Mon, 16 May 2022 11:41:15 -0700 (PDT) Received: from localhost ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id r7-20020adfab47000000b0020d0a57af5esm3011570wrc.79.2022.05.16.11.41.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 May 2022 11:41:14 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 20/23] Momentary breakpoints should have no breakpoint number Date: Mon, 16 May 2022 19:40:27 +0100 Message-Id: <20220516184030.665489-21-pedro@palves.net> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220516184030.665489-1-pedro@palves.net> References: <20220516184030.665489-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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: , X-List-Received-Date: Mon, 16 May 2022 18:41:18 -0000 Momentary breakpoints have no breakpoint number, their breakpoint number should be always 0, to avoid constantly incrementing (or decrementing) the internal breakpoint count. Indeed, set_momentary_breakpoint installs the created breakpoint without a number. However, momentary_breakpoint_from_master incorrectly gives an internal breakpoint number to the new breakpoint. This commit fixes that. Change-Id: Iedcae5432cdf232db9e9a6e1a646d358abd34f95 --- gdb/breakpoint.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0d239f50fcc..4f664cbd7aa 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -7945,7 +7945,6 @@ momentary_breakpoint_from_master (struct breakpoint *orig, copy->enable_state = bp_enabled; copy->disposition = disp_donttouch; - copy->number = internal_breakpoint_number--; breakpoint *b = add_to_breakpoint_chain (std::move (copy)); update_global_location_list_nothrow (UGLL_DONT_INSERT); -- 2.36.0