From 0ef481c30f94382a622c1921cba6ce1539f429f4 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 1 Apr 2026 19:12:15 +0100 Subject: [PATCH] x86_64: cmake: add support for running qemu with debugging and stdio monitor output --- arch/x86_64/QEMU.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/x86_64/QEMU.cmake b/arch/x86_64/QEMU.cmake index f1a9474..bcda160 100644 --- a/arch/x86_64/QEMU.cmake +++ b/arch/x86_64/QEMU.cmake @@ -78,6 +78,16 @@ if (LLDB) USES_TERMINAL DEPENDS ${patched_kernel} bsp) + add_custom_target(debug-kernel-monitor + COMMAND + ${QEMU} + -kernel ${patched_kernel} + -initrd ${sys_dir}/${bsp_name} + ${generic_flags} + -monitor stdio -s -S + USES_TERMINAL + DEPENDS ${patched_kernel} bsp) + if (image_cdrom) message(STATUS "QEMU: Enable CD-ROM debug with LLDB") add_custom_target(debug-cdrom