From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9380 invoked by alias); 5 Nov 2002 23:26:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9371 invoked from network); 5 Nov 2002 23:26:50 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 5 Nov 2002 23:26:50 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gA5N4Iw16264 for ; Tue, 5 Nov 2002 18:04:18 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gA5NQof04472; Tue, 5 Nov 2002 18:26:50 -0500 Received: from localhost.redhat.com (IDENT:YLlcs9Xhiz022PoTJ5fZmCcUXe6h0XLY@tooth.toronto.redhat.com [172.16.14.29]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gA5NQmT21543; Tue, 5 Nov 2002 18:26:48 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id EA5FFFF79; Tue, 5 Nov 2002 18:22:38 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15816.21181.748534.54828@localhost.redhat.com> Date: Tue, 05 Nov 2002 15:26:00 -0000 To: fnasser@redhat.com, gdb-patches@sources.redhat.com Subject: [RFA] cli-out.c new function X-SW-Source: 2002-11/txt/msg00079.txt.bz2 This function sets the stream of the uiout file to the given parameter. It is used in the interpreter work. Maybe Keith or JimI can explain this a bit better, but switching interpreters can change the gdb_sdout. /* gdb_stdout could change between the time cli_uiout was initialized and now. Since we're probably using a different interpreter which has a new ui_file for gdb_stdout, use that one instead of the default. It is important that it gets reset everytime, since the user could set gdb to use a different interpreter. */ old_stream = cli_out_set_stream (cli_uiout, gdb_stdout); Elena 2002-11-05 Elena Zannoni From Jim Ingham and Keith Seitz : * cli-out.h (cli_out_set_stream): Export. * cli-out.c (cli_out_set_stream): New function. Index: cli-out.c =================================================================== RCS file: /cvs/uberbaum/gdb/cli-out.c,v retrieving revision 1.14 diff -u -p -r1.14 cli-out.c --- cli-out.c 19 Mar 2002 02:51:04 -0000 1.14 +++ cli-out.c 5 Nov 2002 23:24:34 -0000 @@ -365,6 +365,16 @@ cli_out_new (struct ui_file *stream) return ui_out_new (&cli_ui_out_impl, data, flags); } +/* Set the stream for UIOUT to the given ui_file STREAM. */ +struct ui_file * +cli_out_set_stream (struct ui_out *uiout, struct ui_file *stream) +{ + struct ui_out_data *data = ui_out_data (uiout); + struct ui_file *old = data->stream; + data->stream = stream; + return old; +} + /* standard gdb initialization hook */ void _initialize_cli_out (void) Index: cli-out.h =================================================================== RCS file: /cvs/uberbaum/gdb/cli-out.h,v retrieving revision 1.2 diff -u -p -r1.2 cli-out.h --- cli-out.h 6 Mar 2001 08:21:06 -0000 1.2 +++ cli-out.h 5 Nov 2002 23:24:34 -0000 @@ -23,5 +23,7 @@ #define CLI_OUT_H extern struct ui_out *cli_out_new (struct ui_file *stream); +extern struct ui_file *cli_out_set_stream (struct ui_out *uiout, + struct ui_file *stream); #endif