From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcY7d-00053K-8X for qemu-devel@nongnu.org; Mon, 30 Mar 2015 07:44:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcY7a-0001SG-3F for qemu-devel@nongnu.org; Mon, 30 Mar 2015 07:44:49 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:18981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcY7Z-0001E4-TU for qemu-devel@nongnu.org; Mon, 30 Mar 2015 07:44:46 -0400 Message-ID: <55193722.3060909@imgtec.com> Date: Mon, 30 Mar 2015 12:44:34 +0100 From: Leon Alrae MIME-Version: 1.0 References: <1427473355-17129-1-git-send-email-christopher.covington@linaro.org> <365908B4-EC54-40B2-B49D-3DFE442F8009@livius.net> <55159043.4040903@imgtec.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] arm: semihosting: Preliminary AArch64 support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liviu Ionescu Cc: Peter Maydell , QEMU Developers , Christopher Covington On 27/03/2015 17:33, Liviu Ionescu wrote: > >> On 27 Mar 2015, at 19:15, Leon Alrae 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 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