From: "Andreas Färber" <afaerber@suse.de>
To: Ankur Dahiya <legalos.lotr@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Qemu breakpoints
Date: Mon, 21 Nov 2011 14:40:41 +0100 [thread overview]
Message-ID: <4ECA54D9.5080909@suse.de> (raw)
In-Reply-To: <CAP3U8udVa3T0bQFdLcf_jPhC1tuSTKSdPwvayJ+8ZVU0VqWn+Q@mail.gmail.com>
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
prev parent reply other threads:[~2011-11-21 13:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 6:43 [Qemu-devel] Qemu breakpoints Ankur Dahiya
2011-11-21 13:40 ` Andreas Färber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECA54D9.5080909@suse.de \
--to=afaerber@suse.de \
--cc=legalos.lotr@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.