From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Make sure to sync registers in monitor/gdbstub Date: Fri, 29 Jun 2007 11:32:24 -0400 Message-ID: <46852608.8030105@qumranet.com> References: <11831304733956-git-send-email-aliguori@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Anthony Liguori Return-path: In-Reply-To: <11831304733956-git-send-email-aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > This patch adds support to gdbstub and the monitor to sync CPU state before > and after the user views/changes it. > > Signed-off-by: Anthony Liguori > > diff --git a/qemu/gdbstub.c b/qemu/gdbstub.c > index c33a66e..a3b82af 100644 > --- a/qemu/gdbstub.c > +++ b/qemu/gdbstub.c > @@ -30,6 +30,7 @@ > #include "qemu.h" > #else > #include "vl.h" > +#include "qemu-kvm.h" > #endif > > #include "qemu_socket.h" > @@ -871,6 +872,9 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf) > addr = strtoull(p, (char **)&p, 16); > #if defined(TARGET_I386) > env->eip = addr; > +#ifdef USE_KVM > + kvm_load_registers(env); > +#endif > You need some if (kvm_allowed) checks in there, no? ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/