From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eQ/SHi2wsWnHBSQAWB0awg (envelope-from ) for ; Wed, 11 Mar 2026 14:10:53 -0400 Received: by simark.ca (Postfix, from userid 112) id 770C41E0DD; Wed, 11 Mar 2026 14:10:53 -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 F0FF31E089 for ; Wed, 11 Mar 2026 14:10:52 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 6A3B84BB5925 for ; Wed, 11 Mar 2026 18:10:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A3B84BB5925 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 19EA14BB58DC for ; Wed, 11 Mar 2026 18:10:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19EA14BB58DC 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 19EA14BB58DC 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=1773252629; cv=none; b=wwgUWuC6gnYmwA3JkKmjPtGtr++EqyjVwsnPnnkNAecgCyCgpS8B1vB08uCZ9avB5x1aBCQqEXqtkCcoQeQbpj+aeJBruYQmNJkXI4wCh1sRYJVgGwG8T/woWw9wfJ63p/iZkB4jakcggr9xT4tcfC+tHWX/eHjZSHgQjmMGu7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773252629; c=relaxed/simple; bh=HWD5hAhXQTDmjLSkr8d9wXpM6AGNmhLBNsM9sq76kyg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=NoXIlS8JJlvxb255WUug5wcBTYzhw79yeDxTQSWsk9NQz8yEbdJgh/sEIndKV2EjzUg79pvnzqVjDGYQ/KPfnGWHTXqlHORDtPWGYqCpH3Knetv8Zxfx5fdQMBRip215YzEst07QyGIcq4Ugi1Nputr0PrkEb4JdPDIwLakE5gs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19EA14BB58DC Received: by simark.ca (Postfix) id 7EC211E089; Wed, 11 Mar 2026 14:10:28 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 08/23] gdb/dwarf: change prototyped_function_p to return bool Date: Wed, 11 Mar 2026 14:05:33 -0400 Message-ID: <20260311180825.720803-9-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: I4a6f6c2d063be780c4d740b8bac2d2d92d42001e --- gdb/dwarf2/read.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 4db3139a265d..514f562e5aba 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -12477,17 +12477,17 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) return set_die_type (die, type, cu); } -/* Assuming that DIE corresponds to a function, returns nonzero +/* Assuming that DIE corresponds to a function, returns true if the function is prototyped. */ -static int +static bool prototyped_function_p (struct die_info *die, struct dwarf2_cu *cu) { struct attribute *attr; attr = dwarf2_attr (die, DW_AT_prototyped, cu); if (attr && attr->as_boolean ()) - return 1; + return true; /* The DWARF standard implies that the DW_AT_prototyped attribute is only meaningful for C, but the concept also extends to other @@ -12497,16 +12497,16 @@ prototyped_function_p (struct die_info *die, struct dwarf2_cu *cu) if (cu->lang () != language_c && cu->lang () != language_objc && cu->lang () != language_opencl) - return 1; + return true; /* RealView does not emit DW_AT_prototyped. We can not distinguish prototyped and unprototyped functions; default to prototyped, since that is more common in modern code (and RealView warns about unprototyped functions). */ if (cu->producer_is_realview ()) - return 1; + return true; - return 0; + return false; } /* Handle DIES due to C code like: -- 2.53.0