qemu-devel
[Top][All Lists]
Advanced

[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>


>      }
>  }







reply via email to

[Prev in Thread] Current Thread [Next in Thread]