I am trying to debug the FreeBSD kernel running in QEMU with LLDB. This works reasonably well with GDB but not with LLDB, unless I am doing something wrong:
$ lldb (lldb) platform select remote-freebsd (lldb) file kernel (lldb) gdb-remote <host>:1234 (lldb) breakpoint set --name btext
The breakpoint gets registered, but is not hit during the boot process (btext is the kernel entry point). Before the kernel is booted, QEMU goes through UEFI ipxe netboot, then the FreeBSD bootloader and only then the actual kernel, which might complicate things.
I also tried to select
remote-gdb-server as platform, but this does not let register any breakpoints.