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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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

Jes

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

Signed-off-by: Jes Sorensen <jes@xxxxxxx>

---
 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
     }
 }
 

[Index of Archives]     [Linux KVM Devel]     [Linux Virtualization]     [Big List of Linux Books]     [Linux SCSI]     [Yosemite Forum]

  Powered by Linux