From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
Subject: [PATCH 3 of 3] [PATCH] kvm-userspace: fix gdbstub kvm integration
Date: Thu, 11 Dec 2008 11:09:35 +0100 [thread overview]
Message-ID: <f80fb35de91fe69dae88.1228990175@HelionPrime> (raw)
In-Reply-To: <patchbomb.1228990172@HelionPrime>
# HG changeset patch
# User Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
# Date 1228989958 -3600
# Node ID f80fb35de91fe69dae889c70948c9a53212ee444
# Parent 6f228c807ad0b239b7342d2974debfc66418d784
[PATCH] kvm-userspace: fix gdbstub kvm integration
From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Some recent qemu upstream merges brought in a new concept to not use "env" as
current cpu in gdb_handle_packet anymore. But the kvm calls still do, this
leads to SIGDEV's as env is not initialized when calling the functions like
kvm_save_registers.
Insted there is now a gdbstate structure holding current cpu for
step/continue and "other" ops splitted.
This patch changes the kvm_save_registers calls to use the right CPUState
variable for the kvm calls in gdb_handle_packet.
Signed-off-by: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
[diffstat]
gdbstub.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[diff]
diff --git a/qemu/gdbstub.c b/qemu/gdbstub.c
--- a/qemu/gdbstub.c
+++ b/qemu/gdbstub.c
@@ -1348,7 +1348,7 @@ static int gdb_handle_packet(GDBState *s
}
break;
case 'g':
- kvm_save_registers(env);
+ kvm_save_registers(s->g_cpu);
len = 0;
for (addr = 0; addr < num_g_regs; addr++) {
reg_size = gdb_read_register(s->g_cpu, mem_buf + len, addr);
@@ -1366,7 +1366,7 @@ static int gdb_handle_packet(GDBState *s
len -= reg_size;
registers += reg_size;
}
- kvm_load_registers(env);
+ kvm_load_registers(s->g_cpu);
put_packet(s, "OK");
break;
case 'm':
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-12-11 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-11 10:09 [PATCH 0 of 3] update gdbstub support Christian Ehrhardt
2008-12-11 10:09 ` [PATCH 1 of 3] [PATCH] kvm-userspace: ppc: Add kvm_translate wrapper Christian Ehrhardt
2008-12-11 10:09 ` [PATCH 2 of 3] [PATCH] qemu: ppc: kvm-userspace: KVM PowerPC support for qemu gdbstub Christian Ehrhardt
2008-12-11 10:09 ` Christian Ehrhardt [this message]
2008-12-16 17:49 ` [PATCH 3 of 3] [PATCH] kvm-userspace: fix gdbstub kvm integration Michal Suchanek
2008-12-17 13:12 ` [PATCH 0 of 3] update gdbstub support Avi Kivity
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=f80fb35de91fe69dae88.1228990175@HelionPrime \
--to=ehrhardt-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.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