Architectural Support: x86_64 (#37)
[lunaix-os.git] / lunaix-os / live_debug.sh
diff --git a/lunaix-os/live_debug.sh b/lunaix-os/live_debug.sh
new file mode 100755 (executable)
index 0000000..e10f71c
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+hmp_port=45454
+gdb_port=1234
+default_cmd="console=/dev/ttyS0"
+
+make CMDLINE=${default_cmd} ARCH=${ARCH} MODE=debug image -j5 || exit -1
+
+./scripts/qemu.py \
+    scripts/qemus/qemu_x86_dev.json \
+    --qemu-dir "${QEMU_DIR}" \
+    -v KIMG=build/lunaix.iso \
+    -v QMPORT=${hmp_port} \
+    -v GDB_PORT=${gdb_port} \
+    -v ARCH=${ARCH} &
+
+QMPORT=${hmp_port} gdb build/bin/kernel.bin -ex "target remote localhost:${gdb_port}"
\ No newline at end of file