diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-02-03 01:18:37 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-02-03 01:18:37 +0000 |
commit | 3b31d625f3b05256b22c245c144e7e228e20f079 (patch) | |
tree | 7ef7e2358a674252f8bbf5fa71ab1e031837d057 /gdb/cli | |
parent | 70a296bc46ba0532f6160caf76355c7e601a1060 (diff) | |
download | gdb-3b31d625f3b05256b22c245c144e7e228e20f079.zip gdb-3b31d625f3b05256b22c245c144e7e228e20f079.tar.gz gdb-3b31d625f3b05256b22c245c144e7e228e20f079.tar.bz2 |
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743
* disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Use
make_cleanup_ui_out_tuple_begin_end and
make_cleanup_ui_out_tuple_begin_end.
(do_mixed_source_and_assembly): Ditto.
* thread.c (do_captured_list_thread_ids): Ditto.
* ui-out.h (ui_out_table_begin, ui_out_list_begin,
ui_out_tuple_begin, ui_out_table_end, ui_out_list_end,
ui_out_tuple_end): Delete prototypes.
* ui-out.c (ui_out_list_begin, ui_out_tuple_begin,
ui_out_list_end, ui_out_tuple_end): Delete.
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
* ui-out.c (make_cleanup_ui_out_table_begin_end)
(do_cleanup_table_end): New functions.
* breakpoint.c (print_it_typical, print_one_breakpoint, mention):
Use cleanups to invoke_ui_out_tuple_end().
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-setshow.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 6fe2ff0..1d68ae4 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -1,6 +1,6 @@ /* Handle set and show GDB commands. - Copyright 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -353,28 +353,35 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c) void cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix) { - ui_out_tuple_begin (uiout, "showlist"); + struct cleanup *showlist_chain; + + showlist_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "showlist"); for (; list != NULL; list = list->next) { /* If we find a prefix, run its list, prefixing our output by its prefix (with "show " skipped). */ if (list->prefixlist && !list->abbrev_flag) { - ui_out_tuple_begin (uiout, "optionlist"); + 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); - ui_out_tuple_end (uiout); + /* Close the tuple. */ + do_cleanups (optionlist_chain); } if (list->type == show_cmd) { - ui_out_tuple_begin (uiout, "option"); + struct cleanup *option_chain + = make_cleanup_ui_out_tuple_begin_end (uiout, "option"); ui_out_text (uiout, prefix); ui_out_field_string (uiout, "name", list->name); ui_out_text (uiout, ": "); do_setshow_command ((char *) NULL, from_tty, list); - ui_out_tuple_end (uiout); + /* Close the tuple. */ + do_cleanups (option_chain); } } - ui_out_tuple_end (uiout); + /* Close the tuple. */ + do_cleanups (showlist_chain); } |