From: Simon Marchi <simark@simark.ca>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] GDB: maint: Fix build on FreeBSD
Date: Fri, 27 Jun 2025 09:50:00 -0400 [thread overview]
Message-ID: <a62b404a-12d6-45ee-b18e-757c81a6bc3c@simark.ca> (raw)
In-Reply-To: <20250627044533.1246090-1-thiago.bauermann@linaro.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 <simon.marchi@efficios.com>
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
next prev parent reply other threads:[~2025-06-27 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 4:45 Thiago Jung Bauermann
2025-06-27 13:50 ` Simon Marchi [this message]
2025-06-27 21:26 ` Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a62b404a-12d6-45ee-b18e-757c81a6bc3c@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox