[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 37/49] semihosting: Fix docs comment for qemu_semihosting_
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 37/49] semihosting: Fix docs comment for qemu_semihosting_console_inc |
Date: |
Mon, 23 May 2022 14:38:43 +0100 |
On Sat, 21 May 2022 at 01:04, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The implementation of qemu_semihosting_console_inc does not
> defer to gdbstub, but only reads from the fifo in console.c.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> include/semihosting/console.h | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/include/semihosting/console.h b/include/semihosting/console.h
> index 0238f540f4..4f6217bf10 100644
> --- a/include/semihosting/console.h
> +++ b/include/semihosting/console.h
> @@ -41,11 +41,10 @@ void qemu_semihosting_console_outc(CPUArchState *env,
> target_ulong c);
> * qemu_semihosting_console_inc:
> * @env: CPUArchState
> *
> - * Receive single character from debug console. This may be the remote
> - * gdb session if a softmmu guest is currently being debugged. As this
> - * call may block if no data is available we suspend the CPU and will
> - * re-execute the instruction when data is there. Therefore two
> - * conditions must be met:
> + * Receive single character from debug console. As this call may block
> + * if no data is available we suspend the CPU and will re-execute the
> + * instruction when data is there. Therefore two conditions must be met:
> + *
> * - CPUState is synchronized before calling this function
> * - pc is only updated once the character is successfully returned
> *
Most functions declared here do use the remote gdb connection,
so I think that like qemu_semihosting_log_out() (whose doc comment
includes a sentence "Unlike..." explaining this) we should
explain why this is an exception to that rule ("Unlike...")
rather than just silently not mentioning it. Having 'inc' not
be reading from the same place that 'outc' writes to is rather
unexpected, after all.
thanks
-- PMM
- [PATCH v3 25/49] semihosting: Split out semihost_sys_read, (continued)
- [PATCH v3 25/49] semihosting: Split out semihost_sys_read, Richard Henderson, 2022/05/20
- [PATCH v3 38/49] semihosting: Pass CPUState to qemu_semihosting_console_inc, Richard Henderson, 2022/05/20
- [PATCH v3 32/49] semihosting: Split out semihost_sys_rename, Richard Henderson, 2022/05/20
- [PATCH v3 22/49] semihosting: Move GET_ARG/SET_ARG earlier in the file, Richard Henderson, 2022/05/20
- [PATCH v3 30/49] semihosting: Split out semihost_sys_flen, Richard Henderson, 2022/05/20
- [PATCH v3 15/49] include/exec: Move gdb_stat and gdb_timeval to gdbstub.h, Richard Henderson, 2022/05/20
- [PATCH v3 37/49] semihosting: Fix docs comment for qemu_semihosting_console_inc, Richard Henderson, 2022/05/20
- Re: [PATCH v3 37/49] semihosting: Fix docs comment for qemu_semihosting_console_inc,
Peter Maydell <=
- [PATCH v3 29/49] semihosting: Split out semihost_sys_isatty, Richard Henderson, 2022/05/20
- [PATCH v3 31/49] semihosting: Split out semihost_sys_remove, Richard Henderson, 2022/05/20
- [PATCH v3 17/49] semihosting: Use struct gdb_stat in common_semi_flen_cb, Richard Henderson, 2022/05/20
- [PATCH v3 21/49] semihosting: Use env more often in do_common_semihosting, Richard Henderson, 2022/05/20
- [PATCH v3 28/49] semihosting: Split out semihost_sys_lseek, Richard Henderson, 2022/05/20
- [PATCH v3 34/49] semihosting: Create semihost_sys_{stat,fstat}, Richard Henderson, 2022/05/20
- [PATCH v3 35/49] semihosting: Create semihost_sys_gettimeofday, Richard Henderson, 2022/05/20