Yes, it seemed to be a good choice to look into, thank you.

But my problem is:
As I've seen, the single step mode generates a debug exception (EXCL_DEBUG)
after every iteration of the main loop, which will make a change in the vm
state.
I can register a vm change state handler in my peripheral and wait until my
external debugger hardware enables the program continuation.
I did exactly this (like the gdb stub), but without success. It seems that
my state change handler is never called.
It is registered in the init function of the peripheral. For now it should
only print out a debug message. When I run qemu-system-arm with the
-single-step option I can not see that particular debug message on the
console (but my other messages are there), so I think my function is not
called.

Am I missing something?

And I have another question: if I call a blocking function in the state
change handler, will it block the CPU (as it seems logical to me) or it is
in another thread?

Regards,
Gabor
 2012/5/2 陳韋任 <che...@iis.sinica.edu.tw>

> > I am designing a virtual peripheral for Qemu, for which I need to single
> step
> > through the program on the emulated CPU (my peripheral will be some kind
> of a
> > debugger). My question is: is there an API to execute exactly one
> instruction
> > in Qemu? I've already found the *_pause and *_resume functions, but they
> are -
> > as far as I know - not applicable for my task.
>
>   Just a quick reply. QEMU system mode provides "-singlestep" option.
> Maybe you
> can start from there, see how the singlestep is done.
>
> Regards,
> chenwj
>
> --
> Wei-Ren Chen (陳韋任)
> Computer Systems Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
> Homepage: http://people.cs.nctu.edu.tw/~chenwj
>

Reply via email to