[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 50/60] semihosting: Remove qemu_semihosting_console_outc
From: |
Richard Henderson |
Subject: |
[PULL 50/60] semihosting: Remove qemu_semihosting_console_outc |
Date: |
Tue, 28 Jun 2022 10:23:53 +0530 |
This function has been replaced by *_write.
Reviewed-by: Luc Michel <lmichel@kalray.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/semihosting/console.h | 13 -------------
linux-user/semihost.c | 16 ----------------
semihosting/console.c | 18 ------------------
3 files changed, 47 deletions(-)
diff --git a/include/semihosting/console.h b/include/semihosting/console.h
index 6994f23c82..d6c1cc58ab 100644
--- a/include/semihosting/console.h
+++ b/include/semihosting/console.h
@@ -24,19 +24,6 @@
*/
int qemu_semihosting_console_outs(CPUArchState *env, target_ulong s);
-/**
- * qemu_semihosting_console_outc:
- * @env: CPUArchState
- * @s: host address of null terminated guest string
- *
- * Send single character from guest memory to the debug console. This
- * may be the remote gdb session if a softmmu guest is currently being
- * debugged.
- *
- * Returns: nothing
- */
-void qemu_semihosting_console_outc(CPUArchState *env, target_ulong c);
-
/**
* qemu_semihosting_console_read:
* @cs: CPUState
diff --git a/linux-user/semihost.c b/linux-user/semihost.c
index 871edf993a..f8bc8889f3 100644
--- a/linux-user/semihost.c
+++ b/linux-user/semihost.c
@@ -33,22 +33,6 @@ int qemu_semihosting_console_outs(CPUArchState *env,
target_ulong addr)
return len;
}
-void qemu_semihosting_console_outc(CPUArchState *env, target_ulong addr)
-{
- char c;
-
- if (get_user_u8(c, addr)) {
- qemu_log_mask(LOG_GUEST_ERROR,
- "%s: passed inaccessible address " TARGET_FMT_lx,
- __func__, addr);
- } else {
- if (write(STDERR_FILENO, &c, 1) != 1) {
- qemu_log_mask(LOG_UNIMP, "%s: unexpected write to stdout failure",
- __func__);
- }
- }
-}
-
/*
* For linux-user we can safely block. However as we want to return as
* soon as a character is read we need to tweak the termio to disable
diff --git a/semihosting/console.c b/semihosting/console.c
index 955880514e..fe7ee85137 100644
--- a/semihosting/console.c
+++ b/semihosting/console.c
@@ -96,24 +96,6 @@ int qemu_semihosting_console_outs(CPUArchState *env,
target_ulong addr)
return out;
}
-void qemu_semihosting_console_outc(CPUArchState *env, target_ulong addr)
-{
- CPUState *cpu = env_cpu(env);
- uint8_t c;
-
- if (cpu_memory_rw_debug(cpu, addr, &c, 1, 0) == 0) {
- if (use_gdb_syscalls()) {
- gdb_do_syscall(semihosting_cb, "write,2,%x,%x", addr, 1);
- } else {
- qemu_semihosting_log_out((const char *) &c, 1);
- }
- } else {
- qemu_log_mask(LOG_GUEST_ERROR,
- "%s: passed inaccessible address " TARGET_FMT_lx,
- __func__, addr);
- }
-}
-
#define FIFO_SIZE 1024
static int console_can_read(void *opaque)
--
2.34.1
- [PULL 41/60] semihosting: Fix docs comment for qemu_semihosting_console_inc, (continued)
- [PULL 41/60] semihosting: Fix docs comment for qemu_semihosting_console_inc, Richard Henderson, 2022/06/28
- [PULL 42/60] semihosting: Pass CPUState to qemu_semihosting_console_inc, Richard Henderson, 2022/06/28
- [PULL 44/60] semihosting: Cleanup chardev init, Richard Henderson, 2022/06/28
- [PULL 45/60] semihosting: Create qemu_semihosting_console_write, Richard Henderson, 2022/06/28
- [PULL 46/60] semihosting: Add GuestFDConsole, Richard Henderson, 2022/06/28
- [PULL 52/60] semihosting: Remove qemu_semihosting_console_outs, Richard Henderson, 2022/06/28
- [PULL 53/60] semihosting: Create semihost_sys_poll_one, Richard Henderson, 2022/06/28
- [PULL 48/60] semihosting: Use console_in_gf for SYS_READC, Richard Henderson, 2022/06/28
- [PULL 47/60] semihosting: Create qemu_semihosting_guestfd_init, Richard Henderson, 2022/06/28
- [PULL 49/60] semihosting: Use console_out_gf for SYS_WRITEC, Richard Henderson, 2022/06/28
- [PULL 50/60] semihosting: Remove qemu_semihosting_console_outc,
Richard Henderson <=
- [PULL 51/60] semihosting: Use console_out_gf for SYS_WRITE0, Richard Henderson, 2022/06/28
- [PULL 43/60] semihosting: Expand qemu_semihosting_console_inc to read, Richard Henderson, 2022/06/28
- [PULL 54/60] target/m68k: Eliminate m68k_semi_is_fseek, Richard Henderson, 2022/06/28
- [PULL 55/60] target/m68k: Make semihosting system only, Richard Henderson, 2022/06/28
- [PULL 56/60] target/mips: Use an exception for semihosting, Richard Henderson, 2022/06/28
- [PULL 59/60] target/nios2: Eliminate nios2_semi_is_lseek, Richard Henderson, 2022/06/28
- [PULL 60/60] target/nios2: Move nios2-semi.c to nios2_softmmu_ss, Richard Henderson, 2022/06/28
- [PULL 57/60] target/mips: Add UHI errno values, Richard Henderson, 2022/06/28
- [PULL 58/60] target/mips: Drop pread and pwrite syscalls from semihosting, Richard Henderson, 2022/06/28
- Re: [PULL 00/60] semihosting patch queue, Richard Henderson, 2022/06/28