This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Semihosting output on ARM7TDMI
- To: Grant Edwards <grante at visi dot com>
- Subject: Re: Semihosting output on ARM7TDMI
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 14 Aug 2001 11:33:02 -0400
- Cc: Joel Brenner <"joel" dot brenner at tchip dot com>, gdb at sourceware dot cygnus dot com
- References: <3B791E3D.A993411F@tchip.com> <20010814095805.A8415@visi.com>
> It looks like it needs to be changed so that it is
> pre-initialized so that stdin, stdout, and stderr are
> "pre-opened". I think you'll need to change the code in
> rdi-share/hsys.c HostSysInit() so that fds 0,1,2, are
> initialized to map to FILE pointers stdin, stdout, stderr.
Almost. The theory is right.
For output the ``struct ui_file'' objects gdb_std*, normally target
output is sent to gdb_stdtarg (one day I'll remember to rename it to
gdb_targout).
For input, things get messy, if you look at remote.c and fixme's from me
there are hopefully enough hints on how it can be done, in theory. It
is made complicated by the fact that there is an event look wanting a
look-in.
Andrew