From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50305 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHyAH-00079m-E3 for qemu-devel@nongnu.org; Mon, 15 Nov 2010 07:28:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHyAF-0004EN-Hz for qemu-devel@nongnu.org; Mon, 15 Nov 2010 07:28:05 -0500 Received: from eu1sys200aog114.obsmtp.com ([207.126.144.137]:58436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHyAF-0004EC-6M for qemu-devel@nongnu.org; Mon, 15 Nov 2010 07:28:03 -0500 Message-ID: <4CE1272B.6050708@st.com> Date: Mon, 15 Nov 2010 13:27:23 +0100 From: Christophe Lyon MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] ARM: semi-hosting support for stderr References: <4C24CECA.1040308@st.com> <4C6D4994.2090209@st.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "qemu-devel@nongnu.org" On 14.11.2010 18:50, Peter Maydell wrote: > 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. > Thanks for your answer. I think we could argue it's a bug in the ARM semihosting spec, so maybe we could request them to change this. However, I am unsure how to do this efficiently, as I recently tried with little success to have them change the "angel_SWIreason_ReportException" such that at least ADP_Stopped_AplicationExit can have the program return code as an extra parameter... (anyway I have another small Qemu patch to handle this situation by returning the contents of r0 when the program entered exit(). I can submit it if someone is willing to review it). Christophe.