qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 01/15] target/arm/arm-semi: Capture errno in


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 01/15] target/arm/arm-semi: Capture errno in softmmu version of set_swi_errno()
Date: Fri, 4 Oct 2019 10:50:08 +0100

On Fri, 4 Oct 2019 at 00:24, Philippe Mathieu-Daudé <address@hidden> wrote:
>
> On 9/16/19 4:15 PM, Peter Maydell wrote:
> > The set_swi_errno() function is called to capture the errno
> > from a host system call, so that we can return -1 from the
> > semihosting function and later allow the guest to get a more
> > specific error code with the SYS_ERRNO function. It comes in
> > two versions, one for user-only and one for softmmu. We forgot
> > to capture the errno in the softmmu version; fix the error.
> >
> > (Semihosting calls directed to gdb are unaffected because
> > they go through a different code path that captures the
> > error return from the gdbstub call in arm_semi_cb() or
> > arm_semi_flen_cb().)
> >
>
> Fixes: 8e71621f784

That was the commit that added support for semihosting
to softmmu in 2007, so I don't think suggesting that this
is a 'fix' to that makes much sense. This has just been
broken forever. (It's also pretty unimportant as a bug because
the semihosting 'errno' is so ill-defined as to be unused,
I think.)

thanks
-- PMM



reply via email to

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