[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration
From: |
Luc Michel |
Subject: |
Re: [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration |
Date: |
Fri, 24 Jun 2022 10:37:24 +0200 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On 13:45 Tue 07 Jun , Richard Henderson wrote:
> Change 'ret' to uint64_t. This resolves a FIXME in the
> m68k and nios2 semihosting that we've lost data.
> Change 'err' to int. There is nothing target-specific
> about the width of the errno value.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> include/exec/gdbstub.h | 3 +--
> gdbstub.c | 7 ++++---
> semihosting/arm-compat-semi.c | 12 +++++-------
> semihosting/console.c | 7 +++----
> semihosting/syscalls.c | 2 +-
> target/m68k/m68k-semi.c | 10 +++-------
> target/nios2/nios2-semi.c | 8 +++-----
> 7 files changed, 20 insertions(+), 29 deletions(-)
>
> diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
> index b588c306cc..f667014888 100644
> --- a/include/exec/gdbstub.h
> +++ b/include/exec/gdbstub.h
[...]
> -static void semihosting_cb(CPUState *cs, target_ulong ret, target_ulong err)
> +static void semihosting_cb(CPUState *cs, uint64_t ret, int err)
> {
> - if (ret == (target_ulong) -1) {
> - qemu_log("%s: gdb console output failed ("TARGET_FMT_ld")",
> - __func__, err);
> + if (err) {
> + qemu_log("%s: gdb console output failed (%d)", __func__, err);
While you're at it, this qemu_log() call probably lacks a '\n'.
Reviewed-by: Luc Michel <lmichel@kalray.eu>
> }
> }
- Re: [PATCH v4 41/53] semihosting: Fix docs comment for qemu_semihosting_console_inc, (continued)
- [PATCH v4 45/53] semihosting: Create qemu_semihosting_console_write, Richard Henderson, 2022/06/07
- [PATCH v4 42/53] semihosting: Pass CPUState to qemu_semihosting_console_inc, Richard Henderson, 2022/06/07
- [PATCH v4 48/53] semihosting: Use console_in_gf for SYS_READC, Richard Henderson, 2022/06/07
- [PATCH v4 47/53] semihosting: Create qemu_semihosting_guestfd_init, Richard Henderson, 2022/06/07
- [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration, Richard Henderson, 2022/06/07
- Re: [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration,
Luc Michel <=
- [PATCH v4 49/53] semihosting: Use console_out_gf for SYS_WRITEC, Richard Henderson, 2022/06/07
- [PATCH v4 46/53] semihosting: Add GuestFDConsole, Richard Henderson, 2022/06/07
- [PATCH v4 43/53] semihosting: Expand qemu_semihosting_console_inc to read, Richard Henderson, 2022/06/07
- [PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0, Richard Henderson, 2022/06/07
- [PATCH v4 50/53] semihosting: Remove qemu_semihosting_console_outc, Richard Henderson, 2022/06/07