[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-arm: return the right exit code when usi
From: |
Christophe Lyon |
Subject: |
Re: [Qemu-devel] [PATCH] target-arm: return the right exit code when using semi-hosting. |
Date: |
Fri, 18 Feb 2011 17:29:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 |
On 18.02.2011 17:13, Peter Maydell wrote:
>
> I'm afraid you've just run into the limitations of semihosting
> as an API again: it doesn't provide a way for programs to pass
Indeed.
> out an exit code, and trying to shoehorn back doors for this
> into qemu just results in ugly code in qemu. The qemu
> implementation of semihosting should implement the semihosting
> API, not semihosting with weird undocumented extras.
Well, exit() is documented in the C ISO standard, so using its argument as exit
code is doing what the user expects.
> If you care about this sort of thing then linux-user mode is
> probably a better approach, as that is actually designed for
> a unixish program to run as-if-natively.
We are using qemu to execute programs compiled in bare machine mode (eg with
arm-none-eabi-gcc as opposed to arm-none-linux-gnueabi-gcc), where semihosting
is used to communicate with the host environment. And we lack support for exit
code.
Christophe.