From ccb9eba6a254f8d5e593972a73504c94a009c729 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 25 Jun 2020 17:59:34 +0100 Subject: gdb: Improve formatting of 'show architecture' messages This commit changes the output of 'show architecture'. Here is a session before this commit: (gdb) show architecture The target architecture is set automatically (currently i386) (gdb) set architecture mips The target architecture is assumed to be mips (gdb) show architecture The target architecture is assumed to be mips (gdb) After this commit the session now looks like this: (gdb) show architecture The target architecture is set to "auto" (currently "i386"). (gdb) set architecture mips The target architecture is set to "mips". (gdb) show architecture The target architecture is set to "mips". (gdb) The changes are: 1. The value is now enclosed in quotes, 2. Each line ends with '.', and 3. After setting the architecture GDB is now a little more assertive; 'architecture is set to' not 'is assumed to be', the user did just tell us after all! gdb/ChangeLog: * arch-utils.c (show_architecture): Update formatting of messages. gdb/testsuite/ChangeLog: * gdb.arch/amd64-osabi.exp: Update. * gdb.arch/arm-disassembler-options.exp: Update. * gdb.arch/powerpc-disassembler-options.exp: Update. * gdb.arch/ppc64-symtab-cordic.exp: Update. * gdb.arch/s390-disassembler-options.exp: Update. * gdb.base/all-architectures.exp.tcl: Update. * gdb.base/attach-pie-noexec.exp: Update. * gdb.base/catch-syscall.exp: Update. * gdb.xml/tdesc-arch.exp: Update. --- gdb/arch-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/arch-utils.c') diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 04955ea..f89260a 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -476,11 +476,11 @@ show_architecture (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (target_architecture_user == NULL) - fprintf_filtered (file, _("The target architecture is set " - "automatically (currently %s)\n"), + fprintf_filtered (file, _("The target architecture is set to " + "\"auto\" (currently \"%s\").\n"), gdbarch_bfd_arch_info (get_current_arch ())->printable_name); else - fprintf_filtered (file, _("The target architecture is assumed to be %s\n"), + fprintf_filtered (file, _("The target architecture is set to \"%s\".\n"), set_architecture_string); } -- cgit v1.1