From: Elena Zannoni <ezannoni@cygnus.com>
To: "Martin M. Hunt" <hunt@redhat.com>
Cc: <gdb@sources.redhat.com>, <insight@sources.redhat.com>
Subject: Re: [RFA] New ui_file streams for Insight
Date: Sun, 01 Apr 2001 12:52:00 -0000 [thread overview]
Message-ID: <15047.34575.434794.317580@kwikemart.cygnus.com> (raw)
In-Reply-To: <Pine.SUN.4.33.0103310011540.11938-100000@rtl.cygnus.com>
Martin M. Hunt writes:
> Here are my first set of changes to add support for multiple streams to
> Insight. Instead of using the tui code and copying gdb_stdlog and
> gdb_stdtarg to gdb_stdout, it creates unique ui_files for each. Currently
> Insight will simple write stderr, stdlog, and stdtarg to the console
> window (if it is open). stderr messages appear in red, stdlog in green,
> and stdtarg in blue.
>
> In main.c, I moved the creation of the gdbtk ui_files until after the
> arguments are parsed. I don't see that this would cause problems,
> although I don't see why any of the ui_files are created before the
> command line is processed.
>
OK, approved. But, I believe the comments and FIXME still apply to the
TUI case, right? I think they should be left in there, in the #ifdef
TUI parts.
Elena
> 2001-03-30 Martin M. Hunt <hunt@redhat.com>
>
> * main.c (captured_main): For GDBtk, don't use tui_fileopen().
> Instead, wait until ars are processed, then if use_windows
> is set, replace the gdb_stdout and gdb_stderr with gdbtk
> ui_files.
>
>
> Index: main.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/main.c,v
> retrieving revision 1.7
> diff -u -p -r1.7 main.c
> --- main.c 2001/03/06 08:21:10 1.7
> +++ main.c 2001/03/31 08:09:18
> @@ -35,10 +35,11 @@
> #include "gdb_string.h"
> #include "event-loop.h"
> #include "ui-out.h"
> -#if defined (TUI) || defined (GDBTK)
> -/* FIXME: cagney/2000-01-31: This #include is to allow older code such
> - as that found in the TUI to continue to build. */
> +
> +#if defined (TUI)
> #include "tui/tui-file.h"
> +#elif defined (GDBTK)
> +extern struct ui_file *gdbtk_fileopen ();
> #endif
>
> /* If nonzero, display time usage both at startup and for each command. */
> @@ -199,10 +200,7 @@ captured_main (void *data)
> getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
> current_directory = gdb_dirbuf;
>
> -#if defined (TUI) || defined (GDBTK)
> - /* Older code uses the tui_file and fputs_unfiltered_hook(). It
> - should be using a customized UI_FILE object and re-initializing
> - within its own _initialize function. */
> +#if defined (TUI)
> gdb_stdout = tui_fileopen (stdout);
> gdb_stderr = tui_fileopen (stderr);
> gdb_stdlog = gdb_stdout; /* for moment */
> @@ -493,6 +491,17 @@ extern int gdbtk_test (char *);
> /* Should this be moved to tui-top.c:_initialize_tui()? */
> if (tui_version)
> init_ui_hook = tuiInit;
> +#elif defined(GDBTK)
> + if (use_windows)
> + {
> + /* close old output and send new to GDBTK */
> + ui_file_delete (gdb_stdout);
> + ui_file_delete (gdb_stderr);
> + gdb_stdout = gdbtk_fileopen ();
> + gdb_stderr = gdbtk_fileopen ();
> + gdb_stdlog = gdbtk_fileopen ();
> + gdb_stdtarg = gdbtk_fileopen ();
> + }
> #endif
>
> /* Initialize all files. Give the interpreter a chance to take
next prev parent reply other threads:[~2001-04-01 12:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-31 0:23 Martin M. Hunt
2001-03-31 7:15 ` Fernando Nasser
2001-04-01 12:52 ` Elena Zannoni [this message]
2001-04-01 13:10 ` Andrew Cagney
2001-04-01 15:37 ` Elena Zannoni
2001-04-01 20:02 ` Martin M. Hunt
2001-04-04 16:46 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15047.34575.434794.317580@kwikemart.cygnus.com \
--to=ezannoni@cygnus.com \
--cc=gdb@sources.redhat.com \
--cc=hunt@redhat.com \
--cc=insight@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).