old-cross-binutils/gdb/cli-out.h
Jan Kratochvil 14dba4b472 gdb/
* breakpoint.c (save_breakpoints): Use RETURN_MASK_ALL.
	* cli-out.c: Include vec.h.
	(cli_field_fmt, cli_spaces, cli_text, cli_message, cli_flush): New
	variable stream, initialize it, use it.
	(cli_redirect): New function comment.  Replace the stream and
	original_stream fields by the new streams field.  Remove the
	original_stream != NULL conditional, assert error on NULL instead.
	(out_field_fmt, field_separator): New variable stream, initialize it, use it.
	(cli_out_data_ctor): Assert non-NULL stream.  Replace the stream and
	original_stream fields by the new streams field.
	(cli_out_set_stream): Replace the stream field by the new streams
	field.
	* cli-out.h: Include vec.h.
	(ui_filep): New typedef, call DEF_VEC_P for it.
	(struct cli_ui_out_data): Replace the stream and original_stream
	fields by the new streams field.
	* cli/cli-logging.c (set_logging_redirect): Call ui_out_redirect with
	NULL first.  Extend the comment.
	(handle_redirections): Call ui_out_redirect with output.
	* python/py-breakpoint.c (bppy_get_commands): Move ui_out_redirect
	calls outside of the TRY_CATCH block.

gdb/testsuite/
	* gdb.base/ui-redirect.exp: New file.
2010-09-03 15:42:04 +00:00

52 lines
1.5 KiB
C

/* Output generating routines for GDB CLI.
Copyright (C) 1999, 2000, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of GDB.
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
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef CLI_OUT_H
#define CLI_OUT_H
#include "ui-out.h"
#include "vec.h"
/* Used for cli_ui_out_data->streams. */
typedef struct ui_file *ui_filep;
DEF_VEC_P (ui_filep);
/* These are exported so that they can be extended by other `ui_out'
implementations, like TUI's. */
struct cli_ui_out_data
{
VEC (ui_filep) *streams;
int suppress_output;
};
extern struct ui_out_impl cli_ui_out_impl;
extern struct ui_out *cli_out_new (struct ui_file *stream);
extern void cli_out_data_ctor (struct cli_ui_out_data *data,
struct ui_file *stream);
extern struct ui_file *cli_out_set_stream (struct ui_out *uiout,
struct ui_file *stream);
#endif