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.hender...@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 <lmic...@kalray.eu> > } > }