[3/4] Remove "enabled" output from show_index_cache_command

Message ID 20250112-submit-help-list-style-title-v1-3-9457a2686440@tromey.com
State New
Headers
Series More command styling changes |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Tom Tromey Jan. 12, 2025, 12:04 p.m. UTC
  show_index_cache_command prints whether the index-cache is enabled.
This text was added back in 2018 in commit 87d6a7aa (Add DWARF index
cache).  Then in 2021, the enabling option was changed via commit
7bc5c369 (gdb: introduce "set index-cache enabled", deprecate "set
index-cache on/off").

This latter change made this output, IMO, redundant.  That is,
currently gdb will show:

    (gdb) show index-cache
    ...
    index-cache enabled:  The index cache is off.
    ...
    The index cache is currently disabled.

This patch removes the redundant output.
---
 gdb/dwarf2/index-cache.c | 5 -----
 1 file changed, 5 deletions(-)
  

Patch

diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
index a04d5d662d883f582064c7df17e76b8b619d9a58..d34abf373f8a5b15efdcf3c847b27b39b71e4c7b 100644
--- a/gdb/dwarf2/index-cache.c
+++ b/gdb/dwarf2/index-cache.c
@@ -280,11 +280,6 @@  show_index_cache_command (const char *arg, int from_tty)
 
   /* Call all "show index-cache" subcommands.  */
   cmd_show_list (show_index_cache_prefix_list, from_tty);
-
-  gdb_printf ("\n");
-  gdb_printf
-    (_("The index cache is currently %s.\n"),
-     global_index_cache.enabled () ? _("enabled") : _("disabled"));
 }
 
 /* "set/show index-cache enabled" set callback.  */