[patch] fix qemu-kvm to build when gdbstub is disabled

Jes Sorensen <[email protected]>
Newsgroups org.kernel.vger.kvm-ia64,org.kernel.vger.kvm
Message-ID <[email protected]>
Hi,

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

Jes
0007-qemu-gdbstub.patch (text/x-patch, 1.1 KB)
Make qemu-kvm build again when CONFIG_GDBSTUB is not set.

Signed-off-by: Jes Sorensen <[email protected]>

---
 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
     }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.