diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-05-01 18:02:53 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-06-28 04:40:47 +0530 |
commit | 7281550cfb30738f0d4bc5113e92780b8a38ec78 (patch) | |
tree | 5246c45eaf68b4db4cede4898010c749d97d12c6 | |
parent | 004d2abe3f2f856bd6f70fa3d8933d5f6d620142 (diff) | |
download | qemu-7281550cfb30738f0d4bc5113e92780b8a38ec78.zip qemu-7281550cfb30738f0d4bc5113e92780b8a38ec78.tar.gz qemu-7281550cfb30738f0d4bc5113e92780b8a38ec78.tar.bz2 |
semihosting: Use console_out_gf for SYS_WRITE0
Reviewed-by: Luc Michel <lmichel@kalray.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | semihosting/arm-compat-semi.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index d61b773..1a1e2a6 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -437,8 +437,15 @@ void do_common_semihosting(CPUState *cs) break; case TARGET_SYS_WRITE0: - ret = qemu_semihosting_console_outs(env, args); - common_semi_set_ret(cs, ret); + { + ssize_t len = target_strlen(args); + if (len < 0) { + common_semi_dead_cb(cs, -1, EFAULT); + } else { + semihost_sys_write_gf(cs, common_semi_dead_cb, + &console_out_gf, args, len); + } + } break; case TARGET_SYS_WRITE: |