From: TeLeMan <geleman@gmail.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Glauber Costa <glommer@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Alexander Graf <agraf@suse.de>,
qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 8/8] Rework debug exception processing for gdb use
Date: Fri, 23 Jul 2010 12:58:58 +0800 [thread overview]
Message-ID: <AANLkTilxQFSZXrO_YSDzr-efkdwxnwi2jZvEhjCSVSAt@mail.gmail.com> (raw)
In-Reply-To: <c3827edf1aafc1731d82b82886dbedd45216c0c9.1277477810.git.jan.kiszka@siemens.com>
On Fri, Jun 25, 2010 at 22:56, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Guest debugging is currently broken under CONFIG_IOTHREAD. The reason is
> inconsistent or even lacking signaling the debug events from the source
> VCPU to the main loop and the gdbstub.
>
> This patch addresses the issue by pushing this signaling into a
> CPUDebugExcpHandler: cpu_debug_handler is registered as first handler,
> thus will be executed last after potential breakpoint emulation
> handlers. It sets informs the gdbstub about the debug event source,
> requests a debug exit of the main loop and stops the current VCPU. This
> mechanism works both for TCG and KVM, with and without IO-thread.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> cpus.c | 26 ++++++++++++++++----------
> kvm-all.c | 2 --
> 2 files changed, 16 insertions(+), 12 deletions(-)
>
> diff --git a/cpus.c b/cpus.c
> index c024421..a607d9a 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -140,6 +140,13 @@ static int any_cpu_has_work(void)
> return 0;
> }
>
> +static void cpu_debug_handler(CPUState *env)
> +{
> + gdb_set_stop_cpu(env);
> + debug_requested = EXCP_DEBUG;
> + vm_stop(EXCP_DEBUG);
> +}
Is debug_requested or vm_stop() redundant?
next prev parent reply other threads:[~2010-07-23 4:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 14:56 [Qemu-devel] [PATCH 0/8] Fix various IO-thread breakages Jan Kiszka
2010-06-25 14:56 ` [Qemu-devel] [PATCH 1/8] Introduce proper compiler barrier Jan Kiszka
2010-06-25 14:56 ` [Qemu-devel] [PATCH 2/8] Fix cpu_unlink_tb race Jan Kiszka
2010-06-25 14:56 ` [Qemu-devel] [PATCH 3/8] Init qemu_system_cond Jan Kiszka
2010-06-25 14:56 ` [Qemu-devel] [PATCH 4/8] Fix cpu_exit for tcp_cpu_exec Jan Kiszka
2010-06-25 14:56 ` [Qemu-devel] [PATCH 5/8] Fix qemu_wait_io_event processing in io-thread mode Jan Kiszka
2010-06-25 14:56 ` [Qemu-devel] [PATCH 6/8] Drop redundant global cur_cpu variable Jan Kiszka
2010-06-25 14:56 ` [Qemu-devel] [PATCH 7/8] Rename tcg_cpu_exec and tcg_has_work Jan Kiszka
2010-06-25 14:56 ` [Qemu-devel] [PATCH 8/8] Rework debug exception processing for gdb use Jan Kiszka
2010-07-23 4:58 ` TeLeMan [this message]
2010-07-23 5:44 ` Jun Koi
2010-07-23 7:57 ` [Qemu-devel] " Jan Kiszka
2010-06-27 12:38 ` [Qemu-devel] Re: [PATCH 0/8] Fix various IO-thread breakages Paolo Bonzini
2010-06-28 13:51 ` Marcelo Tosatti
2010-07-22 12:15 ` [Qemu-devel] " Aurelien Jarno
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=AANLkTilxQFSZXrO_YSDzr-efkdwxnwi2jZvEhjCSVSAt@mail.gmail.com \
--to=geleman@gmail.com \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=glommer@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).