TAGS = ctags
OBJS += cpuid.o
-OBJS += read-write.o
+OBJS += disk/core.o
+OBJS += hw/rtc.o
+OBJS += hw/serial.o
OBJS += interrupt.o
OBJS += ioport.o
-OBJS += kvm.o
OBJS += kvm-cpu.o
+OBJS += kvm.o
OBJS += main.o
OBJS += mmio.o
OBJS += pci.o
-OBJS += hw/rtc.o
-OBJS += hw/serial.o
+OBJS += read-write.o
OBJS += term.o
OBJS += util.o
OBJS += virtio/blk.o
OBJS += virtio/core.o
OBJS += virtio/net.o
OBJS += virtio/rng.o
-OBJS += util/parse-options.o
-OBJS += util/strbuf.o
-OBJS += kvm-help.o
-OBJS += kvm-cmd.o
-OBJS += kvm-run.o
-OBJS += disk/qcow.o
-OBJS += disk/core.o
-OBJS += disk/raw.o
-OBJS += disk/blk.o
-OBJS += mptable.o
-OBJS += threadpool.o
-OBJS += irq.o
-OBJS += rbtree.o
-OBJS += util/rbtree-interval.o
-OBJS += virtio/9p.o
-OBJS += ioeventfd.o
+OBJS += disk/blk.o
+OBJS += disk/qcow.o
+OBJS += disk/raw.o
+OBJS += ioeventfd.o
+OBJS += irq.o
+OBJS += kvm-cmd.o
+OBJS += kvm-debug.o
+OBJS += kvm-help.o
+OBJS += kvm-run.o
+OBJS += mptable.o
+OBJS += rbtree.o
+OBJS += threadpool.o
+OBJS += util/parse-options.o
+OBJS += util/rbtree-interval.o
+OBJS += util/strbuf.o
+OBJS += virtio/9p.o
FLAGS_BFD=$(CFLAGS) -lbfd
#include <assert.h>
/* user defined header files */
-#include <kvm/kvm-cmd.h>
-#include <kvm/kvm-help.h>
-#include <kvm/kvm-run.h>
+#include "kvm/kvm-debug.h"
+#include "kvm/kvm-help.h"
+#include "kvm/kvm-cmd.h"
+#include "kvm/kvm-run.h"
struct cmd_struct kvm_commands[] = {
+ { "debug", kvm_cmd_debug, NULL, 0 },
{ "help", kvm_cmd_help, NULL, 0 },
{ "run", kvm_cmd_run, kvm_run_help, 0 },
{ NULL, NULL, NULL, 0 },
--- /dev/null
+#include <stdio.h>
+#include <string.h>
+
+#include <kvm/util.h>
+#include <kvm/kvm-cmd.h>
+#include <kvm/kvm-debug.h>
+
+int kvm_cmd_debug(int argc, const char **argv, const char *prefix)
+{
+ return system("kill -3 $(pidof kvm)");
+}