diff options
author | Daniel Jacobowitz <drow@false.org> | 2004-04-19 19:57:32 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2004-04-19 19:57:32 +0000 |
commit | bf298dd37122d45dbeaa609472714cb74793a521 (patch) | |
tree | 9948765ee7a0a7af3b5c6cf446cff034282ae60e /gdb | |
parent | 1c956d7beef9de5280fc10c99d12dd395a85348b (diff) | |
download | fsf-binutils-gdb-bf298dd37122d45dbeaa609472714cb74793a521.zip fsf-binutils-gdb-bf298dd37122d45dbeaa609472714cb74793a521.tar.gz fsf-binutils-gdb-bf298dd37122d45dbeaa609472714cb74793a521.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/ChangeLog.intercu | 5 | ||||
-rw-r--r-- | gdb/cli/cli-setshow.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog.intercu b/gdb/ChangeLog.intercu index 4b70276..9f68f20 100644 --- a/gdb/ChangeLog.intercu +++ b/gdb/ChangeLog.intercu @@ -1,3 +1,8 @@ +2004-04-19 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-04-18 Daniel Jacobowitz <drow@mvista.com> * dwarf2read.c (add_partial_structure): Remove. diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 62fe36f..91b018e 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); } |