On 21 May 2015 at 16:24, Liviu Ionescu <i...@livius.net> wrote: > >> On 21 May 2015, at 18:06, Peter Maydell <peter.mayd...@linaro.org> wrote: >> >> ... >> That's their choice... It is still an array of substrings, >> but if the user only provides one string then we have an >> array of length 1. > > this was my initial point, as long as you offer the choice, > you no longer have consistent usage between ARM and MIPS, > the ARM users will prefer the array of length 1.
There's no way to not offer the choice. In your syntax this would be --semihosting-cmdline "foo bar baz" >> ... >> Adding quotes and apostrophes seems wrong to me, >> because it's making assumptions about the guest's >> handling of the semihosting string. > > yes, it is making the assumption that the guest code is able to > process args with embedded spaces. once this accepted, properly > parsing the quotes and apostrophes is required anyway Required by who? It's not in the semihosting API. You could perfectly well have a guest which required arguments with spaces to be quoted via <> characters, or which just treated the whole string as a single element, or which didn't have any quoting support... -- PMM