From: Christophe Lyon <christophe.lyon@st.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
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 [thread overview]
Message-ID: <4D5E9E5C.70809@st.com> (raw)
In-Reply-To: <AANLkTinHoWKayV1cK=BERSti4s3JeWK0vJ2O9PwKsGFr@mail.gmail.com>
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.
next prev parent reply other threads:[~2011-02-18 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 15:45 [Qemu-devel] [PATCH] target-arm: return the right exit code when using semi-hosting Christophe Lyon
2011-02-18 16:13 ` Peter Maydell
2011-02-18 16:29 ` Christophe Lyon [this message]
2011-02-18 17:38 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D5E9E5C.70809@st.com \
--to=christophe.lyon@st.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.