On 27/03/2015 17:33, Liviu Ionescu wrote: > >> On 27 Mar 2015, at 19:15, Leon Alrae <leon.al...@imgtec.com> wrote: >> >> ... introducing separate "-semihosting-arg" option to pass input arguments > > if we'll ever go for this solution, I would call it "-semihosting-cmdline", > since it should include the entire command line, starting with argv[0]. > >> ... but basically it makes the life easier. > > this was my opinion too, and my first patches implemented this solution. > >> On 27 Mar 2015, at 19:21, Peter Maydell <peter.mayd...@linaro.org> wrote: >> ... The >> problem with extra ad-hoc top level command line arguments >> is that they don't fit in with the structure we're trying >> to impose on new QEMU options, which is that they should >> have a particular syntax and sit inside option groups >> (in this case, -semihosting-config). > > this is also true, and, although a bit more complicated to use, I implemented > this solution.
Avoiding top level ad-hoc arguments sounds reasonable. Unfortunately the QEMU parser doesn't seem to support the same sub-argument used multiple times (always the last value is used): -semihosting-config arg="argument 1",arg="argument 2",arg="argument 3" I may look into it to see how much is missing to make it work. The reason I chose "arg" is because it naturally translates into argv[] for the guest program. As far as "cmdline" option goes -- wouldn't "arg" be more flexible so that you could use it to assemble cmdline? Leon