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

Guinevere Larsen
2025-11-07T13:41:59Z

On 11/7/25 4:46 AM, Eli Zaretskii wrote:
>> 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?

A CPU architecture is something like "arm" or "x86". The
microarchitecture is changes within that architecture, like "armv3",
"armv4", "armv3m" and so on.

I'm not sure how to expand on this in the manual, and considering this
is how "set architecture" works, I just thought it would be good to be
more specific, but I can just call it "architecture" instead, if you
think it is better.

>
>> +@item info architectures
>> +@item info architectures @var{regexp}
>> +List architectures supported by GDB. If @var{regexp} is provided, filter
Fixed
> ^^
> Two spaces there.
>
> Reviewed-By: Eli Zaretskii <eliz@gnu.org>
>

--
Cheers,
Guinevere Larsen
It/she