qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ARM: semi-hosting support for stderr
@ 2010-06-25 15:44 Christophe LYON
  2010-08-19 15:11 ` Christophe Lyon
  0 siblings, 1 reply; 4+ messages in thread
From: Christophe LYON @ 2010-06-25 15:44 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-15 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-25 15:44 [Qemu-devel] [PATCH] ARM: semi-hosting support for stderr Christophe LYON
2010-08-19 15:11 ` Christophe Lyon
2010-11-14 17:50   ` Peter Maydell
2010-11-15 12:27     ` Christophe Lyon

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).