aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2004-05-10 18:17:25 +0000
committerDaniel Jacobowitz <drow@false.org>2004-05-10 18:17:25 +0000
commit37fc812e64d75bfe01a22d7184d8bf96e77ea361 (patch)
treea6ba38b2b190b2c8160f95b11b72c1d153d02ded /gdb
parentc4143af614f9fdb6be35ad9e68711b197b63741b (diff)
downloadgdb-37fc812e64d75bfe01a22d7184d8bf96e77ea361.zip
gdb-37fc812e64d75bfe01a22d7184d8bf96e77ea361.tar.gz
gdb-37fc812e64d75bfe01a22d7184d8bf96e77ea361.tar.bz2
* cli/cli-setshow.c (cmd_show_list): Check for "show" in the middle
of prefixes. Don't print the prefix twice in the CLI.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/cli/cli-setshow.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index af504aa..d5b1337 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * cli/cli-setshow.c (cmd_show_list): Check for "show" in the middle
+ of prefixes. Don't print the prefix twice in the CLI.
+
2004-05-10 Jim Blandy <jimb@redhat.com>
* ppc-tdep.h (struct gdbarch_tdep): Change definition of
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 37b289d..cf87cf6 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -364,8 +364,10 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
{
struct cleanup *optionlist_chain
= make_cleanup_ui_out_tuple_begin_end (uiout, "optionlist");
- ui_out_field_string (uiout, "prefix", list->prefixname + 5);
- cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
+ char *new_prefix = strstr (list->prefixname, "show ") + 5;
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "prefix", new_prefix);
+ cmd_show_list (*list->prefixlist, from_tty, new_prefix);
/* Close the tuple. */
do_cleanups (optionlist_chain);
}