qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB


From: Liviu Ionescu
Subject: Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB
Date: Mon, 17 Nov 2014 16:32:33 +0200

On 17 Nov 2014, at 14:32, Peter Maydell <address@hidden> wrote:

> that it's combining six different features and bug fixes into a
> single commit. Could you separate them out into their own patches?

sure. in practical terms, this requires separate branches and each be applied 
to master, right?

my experience with git is not as good as I would like (but improving), and, 
considering all changes are now in a single branch, could you suggest a simple 
way to do this?

> should go) is definitely a feature we should add. I think it's
> possible to make use of the QemuOpts infrastructure to support
> -semihosting  # current option name with existing semantics
> -semihosting target=gdb
> -semihosting target=native
> -semihosting target=auto   # same as plain "-semihosting"
> ...

will try this

>> A more generic option was added to specify the application file to be 
>> emulated
>> 
>>    -image file-path
> 
> I'm pretty wary about this one, because we already have several image
> loading options (-kernel, -bios) with complicated semantics that may
> not be the same on different target architectures. What does your
> "-image" option do that's different from the existing "-kernel" ?

there are two issues here:

- try to completely ignore your use case of qemu; you have a simple embedded 
application, or a unit test, that you want to run under qemu, in a similar way 
you run it on the physical board; you read the qemu manual and you find out 
that you need to load a linux kernel; this makes absolutely no sense, the small 
elf you want to run has absolutely nothing to do with any kernel. the -kernel 
option is also accompanied by several other options, like -initrd, etc that 
also make no sense for regular embedded applications. 

- when using the -kernel option, there is also an -append option, to tell the 
kernel to start with a command line constructed by concatenating the kernel 
full path and the given options; this does not apply to non-linux images, for 
those the options are passed via semihosting entirely, including the argv[0]. 
hence the -semihosting-cmdline, that pairs with -image, not with -kernel, which 
pairs with -append, but with different functionality.

so, -image is more general than -kernel, and is a better match for general use, 
while -kernel is specific to unix/linux emulations. 


regards,

Liviu




reply via email to

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