From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Grant Edwards Cc: Joel Brenner <"joel".brenner@tchip.com>, gdb@sourceware.cygnus.com Subject: Re: Semihosting output on ARM7TDMI Date: Tue, 14 Aug 2001 08:33:00 -0000 Message-id: <3B7944AE.5000902@cygnus.com> References: <3B791E3D.A993411F@tchip.com> <20010814095805.A8415@visi.com> X-SW-Source: 2001-08/msg00126.html > 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