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. -- PMM