From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by sourceware.org (Postfix) with ESMTPS id B3E983857363 for ; Mon, 16 May 2022 18:40:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3E983857363 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-f42.google.com with SMTP id o12-20020a1c4d0c000000b00393fbe2973dso102126wmh.2 for ; Mon, 16 May 2022 11:40:54 -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=AdvLYLV7ySgg3kMwU/VgoMUZqyAk8baA9t9/vLIvrXY=; b=2qmGbSYoPgx5ezW2OHL943DGTuVPC00t55Yklum0kKhfMkamiol2R/sZoMjFuwHdwh a+sxJqiQ5Fw10eiMGfIGi4+arWCzaldJHi8gD0Nrr/02O0BWhT0rTGSLMR6u9lYLOpNl jhJ9fjA2+bH4nWzlZ6ljssJLAlum7MFpdB8MSgvjkcs/wBs4iRnzP2rwxkQ0lv6IDl75 WqoNUr3aMzXAWJvwOBvqzTX+FgZtHtUctzIx+BBYu/HIIbeEHtU9clnkpGmJDcqegMXs wo7N3FR1WDUlF9TMMYWF9HEpWOp1OGC/QGafgEDzgFCzhu8z5RZlHZphjDpHVlhHTrVu Ix5g== X-Gm-Message-State: AOAM533P7T28qw9Vir3/ZRxxp4X2UoYLtCDbVDVc+E6JA8gd89prinj1 BjeVXzMD39Si5RgKlr0HretW8I6Ex6Y= X-Google-Smtp-Source: ABdhPJyUxdrSBz8FPeMrL/jZEKKnRVXpjpVPHCrH+bMKS4303uedSvULTzJtG3mXzn+WQcXTQmmbLQ== X-Received: by 2002:a7b:c4d8:0:b0:393:fecd:2718 with SMTP id g24-20020a7bc4d8000000b00393fecd2718mr18208944wmk.23.1652726453754; Mon, 16 May 2022 11:40:53 -0700 (PDT) Received: from localhost ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id p19-20020adfba93000000b0020d117a4e00sm1285839wrg.105.2022.05.16.11.40.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 May 2022 11:40:52 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 10/23] Make ada_catchpoint_location's owner ctor parameter be ada_catchpoint Date: Mon, 16 May 2022 19:40:17 +0100 Message-Id: <20220516184030.665489-11-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:55 -0000 This commit changes ada_catchpoint_location's ctor from: ada_catchpoint_location (breakpoint *owner) to: ada_catchpoint_location (ada_catchpoint *owner) just to make the code better document intention. To do this, we need to move the ada_catchpoint_location type's definition to after ada_catchpoint is defined, otherwise the compiler doesn't know that ada_catchpoint is convertible to struct breakpoint. Change-Id: Id908b2e38bde30b262381e00c5637adb9bf0129d --- gdb/ada-lang.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 248b847cfbc..1c70f4178d0 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -12102,22 +12102,6 @@ static std::string ada_exception_catchpoint_cond_string exception, in order to be able to re-set the condition expression when symbols change. */ -/* An instance of this type is used to represent an Ada catchpoint - breakpoint location. */ - -class ada_catchpoint_location : public bp_location -{ -public: - ada_catchpoint_location (breakpoint *owner) - : bp_location (owner, bp_loc_software_breakpoint) - {} - - /* The condition that checks whether the exception that was raised - is the specific exception the user specified on catchpoint - creation. */ - expression_up excep_cond_expr; -}; - /* An instance of this type is used to represent an Ada catchpoint. */ struct ada_catchpoint : public base_breakpoint @@ -12144,6 +12128,22 @@ struct ada_catchpoint : public base_breakpoint enum ada_exception_catchpoint_kind m_kind; }; +/* An instance of this type is used to represent an Ada catchpoint + breakpoint location. */ + +class ada_catchpoint_location : public bp_location +{ +public: + explicit ada_catchpoint_location (ada_catchpoint *owner) + : bp_location (owner, bp_loc_software_breakpoint) + {} + + /* The condition that checks whether the exception that was raised + is the specific exception the user specified on catchpoint + creation. */ + expression_up excep_cond_expr; +}; + /* Parse the exception condition string in the context of each of the catchpoint's locations, and store them for later evaluation. */ -- 2.36.0