From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id FKyfITqiXmj09iEAWB0awg (envelope-from ) for ; Fri, 27 Jun 2025 09:52:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1751032378; bh=95AfVtsGWisIZ8+stZ3d5V7pkvtAb1G597PbDab0jIk=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ha/aX2Zb9lhgRE5l5fCqHrtKPfYQba03CfyWpV2XpGExHIZccpigTR4wi9dr0AONm WtekQ12rgCJWcnw37j2+y/+3QwoptmvUFAvhVxRl8DYRSUO/++Vy9x+vSaWk2dmNKm f39bBRY9TxgN5BDawSBT8i+UJ1b2LDPDLqqyqHuw= Received: by simark.ca (Postfix, from userid 112) id 766C81E11E; Fri, 27 Jun 2025 09:52:58 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=unavailable autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=Gnwz89MS; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=scMC6++F; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 612171E089 for ; Fri, 27 Jun 2025 09:52:57 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9211385701B for ; Fri, 27 Jun 2025 13:52:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9211385701B Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=Gnwz89MS; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=scMC6++F Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E74743857BB6 for ; Fri, 27 Jun 2025 13:50:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E74743857BB6 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E74743857BB6 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=1751032209; cv=none; b=uYYL56mVgvPw1YxnaComZCF8l+kCnIFV56IdYPKYRReg8HRaVnAUyWQXBm7iUuSU0TRD73QtOLz8HXMfsWTGPQNtgzF6WtdWfEdmjiD3V4fz0gQnWZ68LVFKs8LMJwUKZkcwhJxvyerFa1iV8F4slgXphtiLGB+fh1xKS8YswbA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751032209; c=relaxed/simple; bh=95AfVtsGWisIZ8+stZ3d5V7pkvtAb1G597PbDab0jIk=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=mAimBHuaKGBFbhbPc/xZ69MbtgiEOaV6OKUXnoUoOjmX/DiEG4hHUfGCYDULjQ8ePQjwlhuXAk8aniO5TzSQqDnHuT23mrVPKWjPp7J04b902bYRJZwRRuu0JQWTUsRLKUUtaExc5jL3LuacepzqWGYLjyIdjHDOVSjvyo257vo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E74743857BB6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1751032203; bh=95AfVtsGWisIZ8+stZ3d5V7pkvtAb1G597PbDab0jIk=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Gnwz89MS/JqvKdi1tBXXehCtPr5fay8ozkv4V+5U1ffhSF1Pezffyabyd79M0BMDf NCsjKY8jqlYfi6tBpQvkfe+UGsZcNMh9ayUB1O//gicpzoiLj0qA5hg6Uvh7DazQmF YvprZNnFvGO8D+MhaEtEEaa7AvNz38qW8jRlQz/8= Received: by simark.ca (Postfix, from userid 112) id 760D71E11E; Fri, 27 Jun 2025 09:50:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1751032201; bh=95AfVtsGWisIZ8+stZ3d5V7pkvtAb1G597PbDab0jIk=; h=Date:Subject:To:References:From:In-Reply-To:From; b=scMC6++FIUEnx4t5/AhuWijAv+AvMr4MwS1UidFDbA4ji5uYuoAyr5eY25EUjy/CP ik6hxDEgezMxSzSxX7VydBVqNz4kH3UzGFmBP4VaJX8OwZwfoMp7ugSs+xj6SlQStz ifF0T4A151s4/p3UpW6htZCv2ZTo+aOOAYd9Ku5c= Received: from [172.16.0.192] (192-222-132-26.qc.cable.ebox.net [192.222.132.26]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 6607E1E089; Fri, 27 Jun 2025 09:50:01 -0400 (EDT) Message-ID: Date: Fri, 27 Jun 2025 09:50:00 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] GDB: maint: Fix build on FreeBSD To: Thiago Jung Bauermann , gdb-patches@sourceware.org References: <20250627044533.1246090-1-thiago.bauermann@linaro.org> Content-Language: fr From: Simon Marchi In-Reply-To: <20250627044533.1246090-1-thiago.bauermann@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 6/27/25 12:45 AM, Thiago Jung Bauermann wrote: > While trying to build current trunk of GDB on FreeBSD 14.3 on aarch64, > I hit this warning converted to an error: > > In file included from /home/bauermann/src/binutils-gdb/gdb/maint.c:37: > /home/bauermann/src/binutils-gdb/gdb/maint.h:64:8: error: private field 'm_start_space' is not used [-Werror,-Wunused-private-field] > 64 | long m_start_space; > | ^ > 1 error generated. > gmake[2]: *** [Makefile:1973: maint.o] Error 1 > > I used the default compiler on this system: > > $ c++ --version > FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2) > Target: aarch64-unknown-freebsd14.3 > Thread model: posix > InstalledDir: /usr/bin > > The problem is that the only two places that use m_start_space are > guarded by HAVE_USEFUL_SBRK, so also guard the member declaration with > it. > > Build-tested on aarch64-unknown-freebsd14.3. I think there is nothing wrong with fixing the build, so: Approved-By: Simon Marchi But then, is this feature useful at all nowadays? I don't have a deep knowledge of memory allocators work, but my understanding is that modern allocators use mmap to obtain more memory from the system (or they use both). So the memory usage computed using sbrk would not be very accurate. All of this to say that, if there is a metric we know is not accurate, it might be better to remove it. Simon