Re: [PATCH 1/2] gdb: introduce command "info architecture"

Eli Zaretskii
2025-11-07T07:47:19Z

> From: Guinevere Larsen <guinevere@redhat.com>
> Cc: Guinevere Larsen <guinevere@redhat.com>
> Date: Thu, 6 Nov 2025 16:45:13 -0300
>
> There is no convenient way to tell a user how to check which
> architectures are supported by their build of GDB. This hasn't really
> been a problem, but now that GDB isn't ported to Apple's new CPU
> architectures, a user could run into a situation where they're trying to
> debug an unsupported CPU.
>
> This commit adds a way to list supported architectures, and filter them
> using a regular expression. No test is added because I couldn't think
> of a good way to verify functionality when we can't control the
> configure line.
> ---
> gdb/NEWS | 4 ++++
> gdb/arch-utils.c | 28 ++++++++++++++++++++++++++++
> gdb/doc/gdb.texinfo | 5 +++++
> 3 files changed, 37 insertions(+)

Thanks. The documentation parts are okay (with one nit, see below),
but I'm struggling to understand what you mean by "CPU
microarchitectures". And without examples, I cannot even guess.
Would it be possible to expand on that in the manual, or at least
provide a could of examples of what the output will look like?

> +@item info architectures
> +@item info architectures @var{regexp}
> +List architectures supported by GDB. If @var{regexp} is provided, filter
^^
Two spaces there.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>