aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2001-01-27 17:57:53 +0000
committerMark Kettenis <kettenis@gnu.org>2001-01-27 17:57:53 +0000
commite6e0bfabf47cb6ac3f5df9f87ee9d9940e3078d8 (patch)
tree357f95b9dde0b2aa2ed6cb457dafeeb2fce86c63 /gdb/ui-out.c
parent9d969b59b8458cfe9cc8a555dc7b98b3b7c6dcaa (diff)
downloadgdb-e6e0bfabf47cb6ac3f5df9f87ee9d9940e3078d8.zip
gdb-e6e0bfabf47cb6ac3f5df9f87ee9d9940e3078d8.tar.gz
gdb-e6e0bfabf47cb6ac3f5df9f87ee9d9940e3078d8.tar.bz2
* ui-out.c (do_list_end): New function.
(make_cleanup_ui_out_list_end): New function. * ui-out.h: Provide prototype for make_cleanup_ui_out_list_end. * stack.c (print_frame) [UI_OUT]: Call make_cleanup_ui_out_list_end to make sure we mark the end of the list if we do a non-local exit. At the end of the function, instead of calling ui_out_list_end directly, let do_cleanups handle it.
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r--gdb/ui-out.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 7953326..0d36639 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -281,6 +281,18 @@ ui_out_list_end (struct ui_out *uiout)
uiout->list_flag--;
}
+static void
+do_list_end (void *uiout)
+{
+ ui_out_list_end (uiout);
+}
+
+struct cleanup *
+make_cleanup_ui_out_list_end (struct ui_out *uiout)
+{
+ return make_cleanup (do_list_end, uiout);
+}
+
void
ui_out_field_int (struct ui_out *uiout, char *fldname, int value)
{