qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Qemu breakpoints


From: Andreas Färber
Subject: Re: [Qemu-devel] Qemu breakpoints
Date: Mon, 21 Nov 2011 14:40:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

Am 20.11.2011 07:43, schrieb Ankur Dahiya:
> 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.

Generally you may get more answers when using a more recent version of
QEMU - last stable is 0.15.1 and we're about to release 1.0.
Further, since you seem to be modifying QEMU's code you would be well
advised to use the latest Git version.

Depending on what you're trying to do, you might be interested in an
instrumentation framework that was proposed by Lluis a while back.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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