From: Peter Maydell <peter.maydell@linaro.org>
To: Liviu Ionescu <ilg@livius.net>
Cc: Christopher Covington <christopher.covington@linaro.org>,
Leon Alrae <leon.alrae@imgtec.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Matthew Fortune <matthew.fortune@imgtec.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/2] semihosting: add --semihosting-config arg sub-argument
Date: Wed, 20 May 2015 16:11:10 +0100 [thread overview]
Message-ID: <CAFEAcA9efJGK_jTUC+UqJTMhtaQ68NbsDNE4UHoUMcVXMs2oTw@mail.gmail.com> (raw)
In-Reply-To: <23C7774F-9E13-488D-B796-D2BC98ECCDD9@livius.net>
On 20 May 2015 at 15:59, Liviu Ionescu <ilg@livius.net> wrote:
>
>> On 20 May 2015, at 17:40, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> ... The ARM semihosting API doesn't mandate any kind of quoting, and we
>> can't know what the guest application expects,
>
> ok (btw, my embedded semihosting code is happy with both quotes or apostrophes)
>
>> so the user is going
>> to have to supply any necessary quotes.
>
> could you exemplify how the qemu syntax would look like for passing
> something functionally equivalent to the shell syntax
> [program --opt1 "path 1" --opt2 "path 2"]?
That depends entirely on how the guest program chooses to parse
its command line string. Semihosting doesn't have any mandated
quoting. So you just want to do something like
--semihosting-config,arg=commandline
where commandline is the command line you want the app to
receive, with:
* any escaping that the shell you ran QEMU via requires
* the comma-escaping that QEMU's --arggroup,opt=value,opt=value
syntax requires for values
In the example above, assuming a POSIX-shell style quoting
and that the guest splits its command line string honouring
double-quotes:
--semihosting-config,arg='program --opt1 "path 1" --opt2 "path 2"'
UHI's API apparently passes arguments individually to the
guest binary, so you would want to use multiple arg=.
-- PMM
next prev parent reply other threads:[~2015-05-20 15:11 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 11:41 [Qemu-devel] [PATCH v3 0/2] semihosting: clean up and add --semihosting-config arg Leon Alrae
2015-05-08 11:41 ` [Qemu-devel] [PATCH v3 1/2] semihosting: create SemihostingConfig structure and semihost.h Leon Alrae
2015-05-08 11:41 ` [Qemu-devel] [PATCH v3 2/2] semihosting: add --semihosting-config arg sub-argument Leon Alrae
2015-05-18 16:18 ` Peter Maydell
2015-05-20 8:11 ` Leon Alrae
2015-05-20 8:30 ` Liviu Ionescu
2015-05-20 8:51 ` Leon Alrae
2015-05-20 11:12 ` Liviu Ionescu
2015-05-20 13:10 ` Leon Alrae
2015-05-20 8:54 ` Peter Maydell
2015-05-20 9:31 ` Leon Alrae
2015-05-20 13:49 ` Liviu Ionescu
2015-05-20 14:18 ` Peter Maydell
2015-05-20 14:31 ` Liviu Ionescu
2015-05-20 14:40 ` Peter Maydell
2015-05-20 14:59 ` Liviu Ionescu
2015-05-20 15:11 ` Peter Maydell [this message]
2015-05-20 15:47 ` Liviu Ionescu
2015-05-21 13:57 ` Leon Alrae
2015-05-21 14:01 ` Peter Maydell
2015-05-21 14:26 ` Leon Alrae
2015-05-21 14:28 ` Liviu Ionescu
2015-05-21 14:33 ` Peter Maydell
2015-05-21 14:57 ` Liviu Ionescu
2015-05-21 15:06 ` Peter Maydell
2015-05-21 15:24 ` Liviu Ionescu
2015-05-21 15:29 ` Peter Maydell
2015-05-21 15:47 ` Liviu Ionescu
2015-05-21 15:54 ` Peter Maydell
2015-05-21 16:36 ` Liviu Ionescu
2015-05-21 16:56 ` Peter Maydell
2015-05-21 17:11 ` Liviu Ionescu
2015-05-21 18:35 ` Maciej W. Rozycki
2015-05-21 18:58 ` Liviu Ionescu
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=CAFEAcA9efJGK_jTUC+UqJTMhtaQ68NbsDNE4UHoUMcVXMs2oTw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=christopher.covington@linaro.org \
--cc=ilg@livius.net \
--cc=leon.alrae@imgtec.com \
--cc=matthew.fortune@imgtec.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).