From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by sourceware.org (Postfix) with ESMTPS id B54753856DDF for ; Mon, 16 May 2022 18:40:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B54753856DDF 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-wm1-f52.google.com with SMTP id bd25-20020a05600c1f1900b0039485220e16so394450wmb.0 for ; Mon, 16 May 2022 11:40:40 -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=jXUMaPNZ9bZL7W08JG8jQ1kuBP1Xh9iYL+6UtChJptU=; b=g/FrpB29upQikiGhHPciS93XsIiB/coAUU64xUbsXiPf5FYJ5/41Hdque34U5tUrbB Pd1ZD+R1VfWm0sGVIU1RfXw7k/HmJJ8V/0lcVgj3A1T26gKZU04ZM4t410eR81yHiw2c ti5Gm/TrXu+8BSpbwa8qSeQA0yNZufYwTTkvM2LFiMrLGFXFV7HMltMp7qBBdWWxte55 7nJOmX3a4pWN+cOxNBdZplKPoO8xtHT4MT9XO3QPnWJsXnc1MXOooRg+dUgB3AkyIUkq djW7VESFO8VtBY2zvHq+Y7bMgtRuFlZa4EEZigRvWvfKZ2zwamR24OspW7/v2y28VZt/ 0B9g== X-Gm-Message-State: AOAM530JYBLq5q3/zltBZ7notqN3OYh7esx4xYcqF4jXP943ygGX4mEP Z/SsFA/lL2sU7544JOX8FAJSW4+Pzow= X-Google-Smtp-Source: ABdhPJwLqXP64WXsH6r0pV1uUTL19Ol+C4kDPb5WOb0QWfGBRAxdCW1CBFrI13Mm9wX4sV9hEGYYMw== X-Received: by 2002:a05:600c:1d08:b0:394:54ee:c994 with SMTP id l8-20020a05600c1d0800b0039454eec994mr18023308wms.137.1652726438984; Mon, 16 May 2022 11:40:38 -0700 (PDT) Received: from localhost ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id n34-20020a05600c3ba200b003945781b725sm13551wms.37.2022.05.16.11.40.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 May 2022 11:40:38 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 03/23] ranged_breakpoint: don't use init_raw_breakpoint Date: Mon, 16 May 2022 19:40:10 +0100 Message-Id: <20220516184030.665489-4-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.6 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:40:42 -0000 ranged_breakpoint's ctor already sets the breakpoint's type to bp_hardware_breakpoint. Since this is a "regular" breakpoint, b->pspace should remain NULL. Thus, the only thing init_raw_breakpoint is needed for, is to add the breakpoint's location. Do that directly. Change-Id: I1505de94c3919881c2b300437e2c0da9b05f76bd --- gdb/breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 8f6794511e7..f9332e1f998 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9439,7 +9439,7 @@ break_range_command (const char *arg, int from_tty) /* Now set up the breakpoint. */ std::unique_ptr br (new ranged_breakpoint (get_current_arch ())); - init_raw_breakpoint (br.get (), sal_start, bp_hardware_breakpoint); + br->add_location (sal_start); b = add_to_breakpoint_chain (std::move (br)); set_breakpoint_count (breakpoint_count + 1); -- 2.36.0