From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CrC2MKVWPGPefwUAWB0awg (envelope-from ) for ; Tue, 04 Oct 2022 11:52:05 -0400 Received: by simark.ca (Postfix, from userid 112) id B7DD61E112; Tue, 4 Oct 2022 11:52:05 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=d6OiihO3; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 70EC11E0D5 for ; Tue, 4 Oct 2022 11:52:05 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ADA3C3858000 for ; Tue, 4 Oct 2022 15:52:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADA3C3858000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664898724; bh=4qsL2wVht/ZQOVJQsaJaUHRkUokOC5iI+1uy72MvXPs=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=d6OiihO3OtobkvMuCgpH/hMhjppzBF2ESneuQUFgMQX7YJdWqrB88cMZpGnDg7xmW 8YlSihr8Kpb06G75ug/j9WKWuQiUtF0bHFGtc/G3diIkvKfgilTYt5N9HoKyy9hREk PAXfIUagfIOiC466nAVaj4uqtmtq/bbSQ9+pQky0= Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 249CE3858C33 for ; Tue, 4 Oct 2022 15:51:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 249CE3858C33 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6362F219BF for ; Tue, 4 Oct 2022 15:51:44 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 55FA7139D2 for ; Tue, 4 Oct 2022 15:51:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QQX5E5BWPGMmHAAAMHmgww (envelope-from ) for ; Tue, 04 Oct 2022 15:51:44 +0000 Message-ID: <6eee2cfa-f428-12fe-4808-039373ef7bd0@suse.de> Date: Tue, 4 Oct 2022 17:51:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH][gdb/symtab] Factor out have_complaint Content-Language: en-US To: gdb-patches@sourceware.org References: <20221004151058.GA20304@delia.home> In-Reply-To: <20221004151058.GA20304@delia.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 10/4/22 17:10, Tom de Vries via Gdb-patches wrote: > Hi, > > After committing 8ba677d3560 ("[gdb/symtab] Don't complain about function > decls") I noticed that quite a bit of code in read_func_scope is used to decide > whether to issue the "cannot get low and high bounds for subprogram DIE at > $hex" complaint, which executes unnecessarily if we have the default > "set complaints 0". > > Fix this by (NFC): > - factoring out new static function have_complaint from macro complaint, and > - using it to wrap the relevant code in read_func_scope. > > Tested on x86_64-linux. > > Any comments? > Well, I didn't check properly, this doesn't even build, I'll repost once I got a properly build & tested version. Sorry for the noise. Thanks, - Tom