[PATCH 0/2] Changes to show architecture/endian message

Andrew Burgess
2020-07-08T08:55:00Z

I was recently debugging some issues around architecture selection so
had cause to use the 'show architecture' command.

The output from this command seemed ... not ideal to me, for example:

(gdb) set architecture mips
The target architecture is assumed to be mips
(gdb) show architecture
The target architecture is assumed to be mips
(gdb)

I don't like the use of 'assumed to be', this (to me) seems to imply
that GDB is making some assumptions on the users behalf. Even if we
interpret this to mean, GDB is assuming because the user told it, I
don't know why we don't just say:

(gdb) set architecture mips
The target architecture is set to "mips".
(gdb) show architecture
The target architecture is set to "mips".
(gdb)

Just say what you mean, the architecture was set to this value.

So, I made this and some other clean ups to the 'show architecture'
output.

Then while I was testing this I noticed that 'show endian' is
basically the same, so I changed that in a similar way.

Does the new output seem like an improvement to anyone else? Or does
anyone else prefer the old output?

Thanks,
Andrew

---

Andrew Burgess (2):
gdb: Improve formatting of 'show architecture' messages
gdb: Improve formatting of 'show endian' messages

gdb/ChangeLog | 4 +++
gdb/arch-utils.c | 14 ++++----
gdb/testsuite/ChangeLog | 8 +++++
gdb/testsuite/gdb.arch/amd64-osabi.exp | 2 +-
.../gdb.base/all-architectures.exp.tcl | 6 ++--
gdb/testsuite/gdb.base/attach-pie-noexec.exp | 4 +--
gdb/testsuite/gdb.base/catch-syscall.exp | 4 +--
gdb/testsuite/gdb.base/endian.exp | 34 +++++++++----------
gdb/testsuite/gdb.xml/tdesc-arch.exp | 6 ++--
9 files changed, 47 insertions(+), 35 deletions(-)

--
2.25.4