All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Qemu breakpoints
@ 2011-11-20  6:43 Ankur Dahiya
  2011-11-21 13:40 ` Andreas Färber
  0 siblings, 1 reply; 2+ messages in thread
From: Ankur Dahiya @ 2011-11-20  6:43 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1019 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-21 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-20  6:43 [Qemu-devel] Qemu breakpoints Ankur Dahiya
2011-11-21 13:40 ` Andreas Färber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.