vmware Kernel GDB Debug Serial Port Not Working With VMWare Fusion

I have FreeBSD 14.0 running in VMWare Fusion 13.5.0 on my Mac with a custom kernel. I'm trying to setup this VM to do kernel debugging on and have added a serial port to the VM. I've confirmed the serial port works by connecting my Mac and the VM and exchanging data between the two.

To setup kernel debugging, I've updated the /boot/device.hints to set the flags. When I run dmesg | grep uart is see the following:

Code:
uart0: <16550 or compatible> iomem 0x3fff03f8-0x3fff03ff irq 0 flags 0x90 on acpi0

Also in that dmesg command I see the following:

Code:
---<<BOOT>>---
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2024 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 15.0-CURRENT #0 main-n268075-ed81a15517b8: Tue Feb  6 15:56:12 CST 2024

I'm not sure what I'm missing as the serial port works. I have also attempted:
  • Entering GDB from DDB on the console which failed with remote GDB backend could not be selected
  • From the loader entering boot -g
  • Trying to set
    Code:
    hw.uart.console="mm:0x3fff03f8,rs:2
    but I'm not clear where and what to set this too.
For now I can debug from the console but this is less than ideal. Any help is appreciated.
 
I resolved this by adding the following to my /boot/loader.con:

Code:
hw.uart.console="mm:0x3fff03f8"
 
Back
Top