On 16/04/2015 15:22, Peter Maydell wrote: > On 15 April 2015 at 10:09, Liviu Ionescu <i...@livius.net> wrote: >> we currently have two solutions: >> >> - multiple: --semihosting-config arg="..." >> - a single option, placed at the end, and followed by any number >> of arguments: --semihosting-cmdline $@ \n >> >> both can generate the array of args required by UHI and both can pass >> args with spaces. > > I strongly dislike the second of these options -- it is nothing like > the way QEMU's system-emulator mode handles other command line > arguments. (The user-mode executable is not a good model to try > to copy, because (a) its sole purpose is executing other binaries > and passing them command line options (b) it doesn't have the > QemuOptions infrastructure.) > > I think the first syntax is fine. If you happen to be on ARM where > there's only a single 'semihosting arguments' string in the ABI > then you can just say --semihosting-config arg="foo bar baz". > This has the comma-escaping ugliness, of course, but if you're > providing a GUI for users anyway it's trivial for the GUI to > comma-escape things.
The patch which started this thread is the way to go then. I'll resend the patch with dropped "RFC" as I would really like to go forward and finally close this issue. Thanks, Leon (PS: --semihosting-cmdline $@ is probably the most convenient from GUI / wrapper point of view, but I don't have an opinion whether this is enough to justify adding a top level QEMU command line option with such a unique syntax)