This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
RE: [FWD] Stdout and stdin do not appear to run when running Insight an d Cygwin for the PowerPC.
- From: "Dickinson, Derek" <Derek dot Dickinson at icn dot siemens dot com>
- To: "'Keith Seitz'" <keiths at redhat dot com>
- Cc: "'insight at sources dot redhat dot com'" <insight at sources dot redhat dot com>
- Date: Mon, 9 Feb 2004 19:54:06 -0800
- Subject: RE: [FWD] Stdout and stdin do not appear to run when running Insight an d Cygwin for the PowerPC.
After some digging around, I discovered that my puts("Hello World"\n)
ends up becoming a write(...) in the function do_write of module:
Insight-6.0\sim\ppc\emul_netbsd.c
I suppose that this should be a sim_io_write_stdout for the simulator
output to be routed correctly? In any event, this explains why none
of the breakpoints were being hit.
Questions:
1) Do you know of a simulator that has very good behavior with
Insight/Cygwin?
In other words, which would be the best to use as an example when I try to
Clean up some of the output.
2) I'm clearly not running netbsd, unix or Motorola bug. How should the OS
option
be set.
Thanks in advance,
Derek
-----Original Message-----
From: Keith Seitz [mailto:keiths@redhat.com]
Sent: Thursday, February 05, 2004 8:19 PM
To: Dickinson, Derek
Subject: Re: [FWD] Stdout and stdin do not appear to run when running
Insight an d Cygwin for the PowerPC.
Hmm. I must have made a typo with your email... It bounced. Trying again.
-----Forwarded Message-----
On Thu, 2004-02-05 at 16:42, Keith Seitz wrote:
> > > Works on Solaris , However output appears in the originating
> > > terminal window.
This is not the correct behavior. All inferior output should show up in the
console window (except when running natively). It appears that remote-sim.c
or the simulator is misbehaving. Does the UI stay alive during when the sim
is running (in a loop, e.g.)?
> > > Works on Cygwin using PowerPc simulator (using XXXX-run command).
> > > Works on Cygwin using PowerPc XXXX-gdb (target sim, load, run).
I presume you mean that you can see your program's output using command-line
gdb. Unfortunately, this is only a sanity test, since command-line gdb just
dumps output to the terminal: it doesn't have any windows to worry about!
> > > Fails under Cygwin using Insight. There are no error messages,
> > > the output doesn't show up anywhere (console or originating terminal).
> > > I've observed the same behavior with a PowerPc environment I built and
one
> > > supplied by MicroCross.
If you have a few seconds to debug this.... Put a breakpoint in
gdb_os_printf_filtered, gdb_os_write_stdout, gdb_os_vfprintf_filtered, and
gdb_os_evprintf_filtered. Which one of these does the output pass through?
Here's a quick thing to try... replace the "gdb_stdout" with "gdb_stdtarg"
in gdb_os_*_filtered. Work now?
Keith