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

Maciej W. Rozycki
2025-11-27T20:01:09Z

On Thu, 27 Nov 2025, Guinevere Larsen wrote:

> > We could reword output from `set architecture' so as not to suggest the
> > use without an argument is invalid.
> >
> > In any case the listing facility must not be an `info' subcommand, as
> > these are meant for showing the state of the debuggee,
>
> I disagree, in my opinion, this new command would function basically just like
> "info unwinder", giving information on how GDB is able to interact with the
> inferior.

Is it the semantics documented in the manual since forever (search for it
and when it appeared there) that you disagree with? I don't know what
`info unwinder' is about, but maybe someone got it wrong too and it should
be a `show' subcommand instead.

> > while the set of
> > architectures supported is a property of the given instance of GDB itself,
> > and therefore suitable for the `set'/`show' commands. So if a new command
> > it would have to be `show architecture list' or suchlike.
>
> My understanding is that set/show commands are mostly used for when the user
> could change something, and the point of this command is showing the user the
> compilation options that were used, there's no changes that a user could do.

Same as with:

(gdb) show version

-- it can't be changed by the user and there's no corresponding `set'
command.

Maciej