From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id 54B4C3858289 for ; Wed, 24 May 2023 16:37:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 54B4C3858289 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-xd33.google.com with SMTP id ca18e2360f4ac-77487baabbbso32317539f.3 for ; Wed, 24 May 2023 09:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1684946247; x=1687538247; 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=I7zJXUqigdiJ2nM8FVmVUqg7ZaJfF8kbZcs14FV1g74=; b=gY0g9+FEfcD1eXL2bb97Z73iHP9Db8P0XQQjoZhtfcLAlMpCrnZw8MFIK+Aoq76tuU RBs1cMS7BAmD0fZo1LbZb7GDWILqzSOoD7Isokv/nFce5fk0ghFsUIEyGKFaVjLOwYUr hi71E34KW/wlrNg8446y/YR+XmFRYJ/Wgvlsc3wvUA5scEF+P0W2lnDjvi/iX1we4atH Z3c9IBVrBh2tk/wMSsGV89be3qc/QGoIiLqTrcLnV/qHilPFMe0luj/4mN8S2PP8ll8M v7AXlmEThcYCOpUpvOWVoU2EDrr+rYQoabFFhk4GptRnSKrmIEAl5qCZpXZiG4RF0Zpb fOSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684946247; x=1687538247; 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=I7zJXUqigdiJ2nM8FVmVUqg7ZaJfF8kbZcs14FV1g74=; b=Aqs7YfKBA1folFaX+Tfzk6ltlGFmwdACIwKbecfYmsn5qxsrwskbEz55zrZI3/Y20v 6eTOmGrah8duVEZQuqayZDIfxBQFWnts9HEm92sjMPHdPYmaackqUv6BmK9n/LnGZ9fW r+4jdpE1PF7RymRbBVFrPm0R1HQQGgGyZFm8hr9CaMpYcxydsygQbyGgOebLfg+18xRU +gTiAsfTiLRCiTppmyAEL4xJ6F7RbM5Bfn7EqWjP73ybG8Q+EvCUX1Nb1V3VbUViHqJT A1X7bMYKMRqp4vJkF8i+5UyVZDYmzSL7v3ch6/nSv2tqh/nsEgg/tFLbxeFJCEA4X0X1 sQrA== X-Gm-Message-State: AC+VfDx3by6LntJUd3GoGDwc++dqsGu2o5pwW/8V3X7cpPpuTRcYoTr3 edRUKgDdNA7ot+wcuIz+Mvl1Am105kmZB3X5WMwq7A== X-Google-Smtp-Source: ACHHUZ40USXH9U/rsfqFDrZvvLv0aQzbk10qx7NvwYm7AhL0HOjIvqi6AWejT8ydj/tI8+rtJCBMGw== X-Received: by 2002:a6b:db0a:0:b0:774:8d9f:e3e2 with SMTP id t10-20020a6bdb0a000000b007748d9fe3e2mr2875900ioc.17.1684946247610; Wed, 24 May 2023 09:37:27 -0700 (PDT) Received: from localhost.localdomain (71-211-130-244.hlrn.qwest.net. [71.211.130.244]) by smtp.gmail.com with ESMTPSA id o22-20020a6bcf16000000b0076c81bf2731sm3397266ioa.20.2023.05.24.09.37.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 09:37:27 -0700 (PDT) From: Tom Tromey Date: Wed, 24 May 2023 10:36:57 -0600 Subject: [PATCH 06/25] Turn should_stop_exception into a method of ada_catchpoint MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230427-ada-catch-exception-v1-6-947caa9905e3@adacore.com> References: <20230427-ada-catch-exception-v1-0-947caa9905e3@adacore.com> In-Reply-To: <20230427-ada-catch-exception-v1-0-947caa9905e3@adacore.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-11.6 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: This turns the should_stop_exception function in ada-lang.c into a method of ada_catchpoint. --- gdb/ada-lang.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 24ed93f2004..d8c7492551c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -12186,6 +12186,12 @@ struct ada_catchpoint : public code_breakpoint void print_mention () const override; void print_recreate (struct ui_file *fp) const override; + /* A helper function for check_status. Returns true if we should + stop for this breakpoint hit. If the user specified a specific + exception, we only want to cause a stop if the program thrown + that exception. */ + bool should_stop_exception (const struct bp_location *bl) const; + /* The name of the specific exception the user specified. */ std::string excep_string; @@ -12275,12 +12281,10 @@ ada_catchpoint::allocate_location () return new ada_catchpoint_location (this); } -/* Returns true if we should stop for this breakpoint hit. If the - user specified a specific exception, we only want to cause a stop - if the program thrown that exception. */ +/* See declaration. */ -static bool -should_stop_exception (const struct bp_location *bl) +bool +ada_catchpoint::should_stop_exception (const struct bp_location *bl) const { struct ada_catchpoint *c = (struct ada_catchpoint *) bl->owner; const struct ada_catchpoint_location *ada_loc -- 2.40.0