qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH] vl.c: add -semihosting-config "arg" sub-arg


From: Liviu Ionescu
Subject: Re: [Qemu-devel] [RFC PATCH] vl.c: add -semihosting-config "arg" sub-argument
Date: Thu, 2 Apr 2015 15:36:01 +0300

> On 02 Apr 2015, at 13:36, Leon Alrae <address@hidden> wrote:
> 
>> How would you pass arguments containing whitespaces via
>> -semihosting-config cmdline without having to reinvent shell within QEMU?
> 
> I missed the fact that you already provided the implementation for this
> below...


for completeness:

ilg-mbp:gnuarmeclipse-qemu.git ilg$ "/Applications/GNU ARM 
Eclipse/QEMU/2.2.91-201504021111-dev/bin/qemu-system-gnuarmeclipse" -verbose 
-machine STM32-H103 -gdb tcp::1234 -semihosting-config 
enable=on,target=native,cmdline='n "1 a" 2 3'

GNU ARM Eclipse QEMU v2.2.91 (qemu-system-gnuarmeclipse).
Board: 'STM32-H103' (Olimex Header Board for STM32F103RBT6 (Experimental)).
Device: 'STM32F103RB' (cortex-m3, MPU), Flash: 128 KB, RAM: 20 KB.
Command line: 'n "1 a" 2 3' (11 bytes).
GDB Server listening on: 'tcp::1234'...
... connection accepted from 127.0.0.1.

Execute 'mon system_reset'.
main(argc=4, argv=["n", "1 a", "2", "3"]);
Hello ARM World!

(note: while testing this I encountered and fixed a small bug in my args parser)

> ... But still, the main point of arg is to keep it simple
> ... can have a wrapper responsible for parsing the command line and
> translating into QEMU command line options.

sure, in Unix any such trick is feasible, but what do you do with the 
unfortunate Windows users?


regards,

Liviu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]