On 19 August 2010 16:11, Christophe Lyon <christophe.l...@st.com> wrote: > On 25.06.2010 17:44, Christophe LYON wrote: >> I propose this small patch so that ARM semi-hosting handles stderr as >> expected when linking with Newlib/libgloss.
Apologies for this rather belated reply, but I only recently managed to confirm the relevant information... Unfortunately there is no means in the semihosting ABI to distinguish app stdout from stderr. Effectively semihosting defines a single input channel and a single output channel, not three stdin/stdout/stderr channels. All the implementations of semihosting that I am aware of work this way, so it's not just an omission from the semihosting documentation. Although newlib/libgloss use different modes for opening stdout and stderr, the ARM C library implementation does not, for instance; so your patch is relying on a detail of implementation of a particular semihosting user. So I don't think we can apply this patch, because it could break other (nonlibgloss) users of semihosting. -- PMM