From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 6E73838582B1 for ; Wed, 5 Oct 2022 09:43:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6E73838582B1 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-617-d6dVIVt1NmGZrTNpuNN8kw-1; Wed, 05 Oct 2022 05:43:26 -0400 X-MC-Unique: d6dVIVt1NmGZrTNpuNN8kw-1 Received: by mail-wr1-f72.google.com with SMTP id e11-20020adfa74b000000b0022e39e5c151so2704932wrd.3 for ; Wed, 05 Oct 2022 02:43:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=RO3H7mtg6JBnlT1DpAXi9SUJoSFtEan3ix3c2IPwFJ8=; b=6EOHhnmRUtRjhUxa2Gg46F/Pd10j4gcXXHe5jBqK7m8I/zviq3M2nCqOL9mmDxmTh9 oqftYk8hnlUteboLpBieqivmZGnACEyqD/nWyZnzcDiJR2vMxycGlhzvK4TRbEsooGPK g9uB0q9b+jq5yTNqz3nkORGG7mg9GbSoEK3lF0IZX13P6qwyAWtIJsnoyRrqix+nkv2j BWs3JwsIFMLzCdh4e8KYZ/9ZYVTB6D88vPhUtsyPA9G1mE0HhsLzlxRtUjZmgA1RhBJG 04pIJsxhK5o7huc8tMSUIb9e9fd2IWWIKJ4VN/7oHmNrQDJHaRUh3yfMZp/rmKuJa4EL wyzQ== X-Gm-Message-State: ACrzQf1W7C0QGnebHLnqPbaq5E5N3LfbrZoU0ZqOfrVuyiJUkEqwBQch YxoYsxRApPGV6fXB8wPgWMIbxppLFroaAkRq1iTNKNDJmDEz5ETUnYYGQ6cfBKHE9QUpYRDeccH NVqJLaD+KwgI1wEcZNYpHQA== X-Received: by 2002:a05:6000:1446:b0:22b:968:446 with SMTP id v6-20020a056000144600b0022b09680446mr18594690wrx.493.1664963005136; Wed, 05 Oct 2022 02:43:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4d3PS5Tg36y7Kq1R1jlLwT9dEubUZPvJVkrIsV2kQ5Qpp5fPlc1G8uFx9/BGgrGMq5mcC8qA== X-Received: by 2002:a05:6000:1446:b0:22b:968:446 with SMTP id v6-20020a056000144600b0022b09680446mr18594681wrx.493.1664963004977; Wed, 05 Oct 2022 02:43:24 -0700 (PDT) Received: from [10.43.2.105] (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id m4-20020a05600c40c400b003b497138093sm1388527wmh.47.2022.10.05.02.43.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Oct 2022 02:43:24 -0700 (PDT) Message-ID: <3c2eb583-a629-8bf3-ce9e-c57e64c12cf5@redhat.com> Date: Wed, 5 Oct 2022 11:43:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH][gdb/symtab] Factor out have_complaint To: Tom de Vries , gdb-patches@sourceware.org References: <20221004151058.GA20304@delia.home> <6eee2cfa-f428-12fe-4808-039373ef7bd0@suse.de> From: Bruno Larsen In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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: Wed, 05 Oct 2022 09:43:32 -0000 On 04/10/2022 18:43, Tom de Vries via Gdb-patches wrote: > On 10/4/22 17:51, Tom de Vries wrote: >> 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. > > And here it is. I tested this locally and it introduces no regressions. And the changes themselves look contained enough, so I recommend you approve your patch! Cheers, Bruno > > Thanks, > - Tom