From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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> From: Tom de Vries In-Reply-To: <20221004151058.GA20304@delia.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: Tue, 04 Oct 2022 15:51:46 -0000 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