diff mbox

fix qemu-kvm to build when gdbstub is disabled

Message ID 4A01AFE8.3020008@sgi.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jes Sorensen May 6, 2009, 3:42 p.m. UTC
Hi,

The latest changes to qemu-kvm breaks miserably if one tries to build
without CONFIG_GDBSTUB.

Jes
diff mbox

Patch

Make qemu-kvm build again when CONFIG_GDBSTUB is not set.

Signed-off-by: Jes Sorensen <jes@sgi.com>

---
 gdbstub.h |    6 ++++++
 vl.c      |    2 --
 2 files changed, 6 insertions(+), 2 deletions(-)

Index: qemu-kvm/gdbstub.h
===================================================================
--- qemu-kvm.orig/gdbstub.h
+++ qemu-kvm/gdbstub.h
@@ -15,7 +15,13 @@ 
 
 void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...);
 int use_gdb_syscalls(void);
+#ifdef CONFIG_GDBSTUB
 void gdb_set_stop_cpu(CPUState *env);
+#else
+static inline void gdb_set_stop_cpu(CPUState *env)
+{
+}
+#endif
 #ifdef CONFIG_USER_ONLY
 int gdb_queuesig (void);
 int gdb_handlesig (CPUState *, int);
Index: qemu-kvm/vl.c
===================================================================
--- qemu-kvm.orig/vl.c
+++ qemu-kvm/vl.c
@@ -4417,13 +4417,11 @@ 
         }
         if (cpu_can_run(env))
             ret = qemu_cpu_exec(env);
-#ifndef CONFIG_GDBSTUB
         if (ret == EXCP_DEBUG) {
             gdb_set_stop_cpu(env);
             debug_requested = 1;
             break;
         }
-#endif
     }
 }