This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[patch] ui_out_stream_delete ()
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [patch] ui_out_stream_delete ()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 15 May 2000 13:12:37 +1000
- Organization: Cygnus Solutions
FYI,
I've committed the attached cleanup.
Andrew
Mon May 15 12:07:55 2000 Andrew Cagney <cagney@b1.cygnus.com>
* printcmd.c (print_frame_args), stack.c (print_frame), command.c
(do_setshow_command), breakpoint.c (print_it_typical, mention):
Use make_cleanup_ui_out_stream_delete.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.8
diff -p -r1.8 breakpoint.c
*** breakpoint.c 2000/03/30 18:54:28 1.8
--- breakpoint.c 2000/05/15 03:08:04
*************** print_it_typical (bs)
*** 1939,1945 ****
struct cleanup *old_chain;
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
#endif /* UI_OUT */
/* bs->breakpoint_at can be NULL if it was a momentary breakpoint
which has since been deleted. */
--- 1939,1945 ----
struct cleanup *old_chain;
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
/* bs->breakpoint_at can be NULL if it was a momentary breakpoint
which has since been deleted. */
*************** mention (b)
*** 4458,4464 ****
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
#endif /* UI_OUT */
/* FIXME: This is misplaced; mention() is called by things (like hitting a
--- 4458,4464 ----
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
/* FIXME: This is misplaced; mention() is called by things (like hitting a
Index: command.c
===================================================================
RCS file: /cvs/src/src/gdb/command.c,v
retrieving revision 1.7
diff -p -r1.7 command.c
*** command.c 2000/04/21 05:21:55 1.7
--- command.c 2000/05/15 03:08:11
*************** do_setshow_command (arg, from_tty, c)
*** 1723,1729 ****
int quote;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
#endif /* UI_OUT */
/* Print doc minus "show" at start. */
--- 1723,1729 ----
int quote;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
/* Print doc minus "show" at start. */
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.6
diff -p -r1.6 printcmd.c
*** printcmd.c 2000/04/26 12:41:48 1.6
--- printcmd.c 2000/05/15 03:08:22
*************** print_frame_args (func, fi, num, stream)
*** 1852,1858 ****
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup (ui_out_stream_delete, stb);
#endif /* UI_OUT */
if (func)
--- 1852,1858 ----
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
if (func)
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.3
diff -p -r1.3 stack.c
*** stack.c 2000/02/29 07:17:15 1.3
--- stack.c 2000/05/15 03:08:30
*************** print_frame (struct frame_info *fi,
*** 471,477 ****
struct cleanup *old_chain;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
#endif /* UI_OUT */
func = find_pc_function (fi->pc);
--- 471,477 ----
struct cleanup *old_chain;
stb = ui_out_stream_new (uiout);
! old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
func = find_pc_function (fi->pc);