public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* RE: How to get stderr to be displayed in the console
@ 2004-11-18 12:15 Jon Beniston
  2004-11-18 17:43 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Beniston @ 2004-11-18 12:15 UTC (permalink / raw)
  To: insight


> 
> I'm using Insight 6.0 on Windows/Cygwin. I'm debugging a 
> program using the remote serial interface. Text sent to 
> stdout appears in the insight console window, but text sent 
> to stderr appears in the window of the shell that started 
> insight.

Similarly, stdin has to come from the shell rather than the Insight console.
Further, stdin and stderr only seem to work if CYGWIN=tty is set. If not,
then accessing stdin / stderr result in "Bad file number" errnos.

Setting CYGWIN=tty screws up output in console mode GDB.

Is this a bug or expected behaviour?

Cheers,
Jon


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: How to get stderr to be displayed in the console
  2004-11-18 12:15 How to get stderr to be displayed in the console Jon Beniston
@ 2004-11-18 17:43 ` Keith Seitz
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2004-11-18 17:43 UTC (permalink / raw)
  To: jbeniston; +Cc: insight

On Thu, 2004-11-18 at 04:14, Jon Beniston wrote:
> > I'm using Insight 6.0 on Windows/Cygwin. I'm debugging a 
> > program using the remote serial interface. Text sent to 
> > stdout appears in the insight console window, but text sent 
> > to stderr appears in the window of the shell that started 
> > insight.
> 
> Similarly, stdin has to come from the shell rather than the Insight console.
> Further, stdin and stderr only seem to work if CYGWIN=tty is set. If not,
> then accessing stdin / stderr result in "Bad file number" errnos.
> 
> Setting CYGWIN=tty screws up output in console mode GDB.
> 
> Is this a bug or expected behaviour?

To be honest, I'm not entirely sure anymore. I think that stderr was
somewhat ignored when the original implementation of I/O handling went
in. It probably wouldn't be too tough to fix, though.
gdbtk-hooks.c:gdbtk_fputs deals with all of this.

As for cygwin native, I don't think that ever worked "properly", and I'm
not sure it ever will [but I could be wrong]. I believe that the unix
version will behave the same way, except for one minor point: we put in
a "workaround".

IMO, this was fixed properly in unix by adding the option to "Open
terminal for inferior I/O" to the target settings dialog. This is needed
because there is no way Insight's console is going to be fully
terminal-aware (for curses applications, for example), so we decided to
add this option.

If we could find a way to do the same thing under cygwin, that would be
the best solution. I just don't think it is any benefit to us to attempt
to deal with any possible terminal weirdness.

Keith

^ permalink raw reply	[flat|nested] 3+ messages in thread

* How to get stderr to be displayed in the console
@ 2004-11-11 16:39 Jon Beniston
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Beniston @ 2004-11-11 16:39 UTC (permalink / raw)
  To: insight

Hi,

I'm using Insight 6.0 on Windows/Cygwin. I'm debugging a program using the
remote serial interface. Text sent to stdout appears in the insight console
window, but text sent to stderr appears in the window of the shell that
started insight. Is there a way to redirect stderr to the insight console
window?

I read a thread "[RFA] New ui_file streams for Insight" that seemed to say a
patch was added to display stderr in red in the console, but this obviously
doesn't seem to be happening for me.

Cheers,
Jon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-18 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-18 12:15 How to get stderr to be displayed in the console Jon Beniston
2004-11-18 17:43 ` Keith Seitz
  -- strict thread matches above, loose matches on Subject: below --
2004-11-11 16:39 Jon Beniston

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).