I am trying to set a breakpoint in qemu. That is, a function of mine should
run when guest eip becomes equal
to some specified address.
I set the bp using : cpu_breakpoint_insert(first_cpu, 0xc103364f, BP_GDB,
NULL) <exec.c>
Then I do cpu_set_debug_excp_handler(NULL) <cpu-exec.c> because the default
excp handler accesses some gdbserver
variables which are not available in my case as I am not running gdbserver.

Now, when the specified address is hit, cpu_handle_debug_exception()
<cpu-exec.c> is called. So, I do my required processing
here. But, I am unable to resume the vm. The guest's eip stays the same and
this function keeps
getting called over and over again. So, how should I resume the vm?
I know this is possible because gdbstub does this. But I have stepped
through the whole code and still can't figure
out how are they doing it!

P.S. I am working on qemu-0.13 and am not using kvm.

Thanks.
Ankur Dahiya

Reply via email to