From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id maFnJ1KwsWnABSQAWB0awg (envelope-from ) for ; Wed, 11 Mar 2026 14:11:30 -0400 Received: by simark.ca (Postfix, from userid 112) id 9B6D81E0DD; Wed, 11 Mar 2026 14:11:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 233FA1E089 for ; Wed, 11 Mar 2026 14:11:30 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id A89434BB58FE for ; Wed, 11 Mar 2026 18:11:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A89434BB58FE Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E71D34BB58DD for ; Wed, 11 Mar 2026 18:10:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E71D34BB58DD Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E71D34BB58DD Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773252632; cv=none; b=gaqlyHc+KRdpHD4syS8bhrASkgh0tzyai0fHFJN/5L/gzLIUfkjxFmz+Jt/hbPtUgvXif1sbPs9Ib2/7LylllOQ7pebnln+Q2RAZcmvdIiEb4t2fJLPvxkMDHTzDaMUeSjrGpGDeo+L+WLYVYR0fX7H2SaYcg6hj9XCOeu8iNJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773252632; c=relaxed/simple; bh=eiBkeerzvGe+PaBw2Kw6IqgDMJNMCLMbn6911s+g6T0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Vc2BDNbyjw3P+PwWtCWVUkZYBTiL0ciSNGfi8Kl8sKwFTJobaynW7IMlvy0lyNVc6TKhrND9PCGK6CzwOxr5tiVoHOKMpPNPsWYfvlxdaGmFl2JRNo3Q7CyfN3VIc5mJoyc+DtjSg/Wdl8fwqHgu4YyAg3aENw/tG5SY83ru1i4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E71D34BB58DD Received: by simark.ca (Postfix) id 196831E0F4; Wed, 11 Mar 2026 14:10:29 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 15/23] gdb/dwarf: change dwarf2_locexpr_baton_eval to return bool Date: Wed, 11 Mar 2026 14:05:40 -0400 Message-ID: <20260311180825.720803-16-simon.marchi@efficios.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260311180825.720803-1-simon.marchi@efficios.com> References: <20260311180825.720803-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Change-Id: Ib22b4ca4365e9943cc17b0d510bf5590842eb258 --- gdb/dwarf2/loc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index 8dfd04461be0..c310fa3d8afd 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -1577,9 +1577,9 @@ dwarf2_evaluate_loc_desc (struct type *type, const frame_info_ptr &frame, before evaluation starts. PUSH_VALUES[0] is pushed first, then PUSH_VALUES[1], and so on. - Returns 1 on success, 0 otherwise. */ + Returns true on success, false otherwise. */ -static int +static bool dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, const frame_info_ptr &frame, const struct property_addr_info *addr_stack, @@ -1588,7 +1588,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, bool *is_reference) { if (dlbaton->size == 0) - return 0; + return false; dwarf2_per_objfile *per_objfile = dlbaton->per_objfile; dwarf2_per_cu *per_cu = dlbaton->per_cu; @@ -1610,20 +1610,20 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, { if (ex.error == NOT_AVAILABLE_ERROR) { - return 0; + return false; } else if (ex.error == NO_ENTRY_VALUE_ERROR) { if (entry_values_debug) exception_print (gdb_stdout, ex); - return 0; + return false; } else throw; } if (result->optimized_out ()) - return 0; + return false; if (result->lval () == lval_memory) *valp = result->address (); @@ -1635,7 +1635,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, *valp = value_as_address (result); } - return 1; + return true; } /* See dwarf2/loc.h. */ -- 2.53.0