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

Maciej W. Rozycki
2025-11-07T15:52:25Z

On Fri, 7 Nov 2025, Guinevere Larsen wrote:

> > Or am I missing something? Of course adding filtering might be useful,
> > especially if the list so large as in my quoted example, but the change
> > description suggests there's no listing facility available.
>
> Well, I wouldn't say we have a listing facility. using Set Architecture
> without an argument may list them, but that is an error message, rather than a
> command to do that, which is why I don't think it is a convenient way to tell
> a user to check for support. You could achieve the same if you asked for
> completion, but again, not a "listing facility" in the sense of telling a user
> to check.

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, 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.

BTW is there a way to globally disable styling by default? I find it
irritating (it distracts me and hurts my eyes) as I do having to type:

(gdb) set style enabled off

every time. Placing the command in $HOME/.config/gdb/gdbinit or
$HOME/.gdbinit does nothing, the welcome message is still a disturbing
mixture of colours.

Maciej