diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-01-27 17:57:53 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-01-27 17:57:53 +0000 |
commit | e6e0bfabf47cb6ac3f5df9f87ee9d9940e3078d8 (patch) | |
tree | 357f95b9dde0b2aa2ed6cb457dafeeb2fce86c63 /gdb/stack.c | |
parent | 9d969b59b8458cfe9cc8a555dc7b98b3b7c6dcaa (diff) | |
download | gdb-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/stack.c')
-rw-r--r-- | gdb/stack.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 85f37d8..5bc044f 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1,5 +1,6 @@ /* Print and select stack frames for GDB, the GNU debugger. - Copyright 1986, 1987, 1989, 1991-1996, 1998-2000 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, + 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -448,6 +449,7 @@ print_frame (struct frame_info *fi, #ifdef UI_OUT struct ui_stream *stb; struct cleanup *old_chain; + struct cleanup *list_chain; stb = ui_out_stream_new (uiout); old_chain = make_cleanup_ui_out_stream_delete (stb); @@ -532,6 +534,7 @@ print_frame (struct frame_info *fi, #ifdef UI_OUT ui_out_list_begin (uiout, "frame"); + list_chain = make_cleanup_ui_out_list_end (uiout); #endif if (level >= 0) @@ -661,7 +664,8 @@ print_frame (struct frame_info *fi, #endif /* PC_SOLIB */ #ifdef UI_OUT - ui_out_list_end (uiout); + /* do_cleanups will call ui_out_list_end() for us. */ + do_cleanups (list_chain); ui_out_text (uiout, "\n"); do_cleanups (old_chain); #else |