From: Christophe LYON <christophe.lyon@st.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] ARM: semi-hosting support for stderr
Date: Fri, 25 Jun 2010 17:44:10 +0200 [thread overview]
Message-ID: <4C24CECA.1040308@st.com> (raw)
Hello,
I propose this small patch so that ARM semi-hosting handles stderr as
expected when linking with Newlib/libgloss.
diff --git a/arm-semi.c b/arm-semi.c
index 9549e6c..6874036 100644
--- a/arm-semi.c
+++ b/arm-semi.c
@@ -211,8 +211,11 @@ uint32_t do_arm_semihosting(CPUState *env)
if (strcmp(s, ":tt") == 0) {
if (ARG(1) < 4)
return STDIN_FILENO;
- else
+ else if (ARG(1) == 4)
return STDOUT_FILENO;
+ else
+ return STDERR_FILENO; /* See newlib/libgloss
+ implementation. */
}
if (use_gdb_syscalls()) {
gdb_do_syscall(arm_semi_cb, "open,%s,%x,1a4", ARG(0),
Christophe
next reply other threads:[~2010-06-25 17:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 15:44 Christophe LYON [this message]
2010-08-19 15:11 ` [Qemu-devel] [PATCH] ARM: semi-hosting support for stderr Christophe Lyon
2010-11-14 17:50 ` Peter Maydell
2010-11-15 12:27 ` Christophe Lyon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C24CECA.1040308@st.com \
--to=christophe.lyon@st.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).