Debug Linux Kernel with OpenOCD & GDB

How can you use OpenOCD to debug FreeBSD? Could you please give me some advise. My problem is OpenOCD Failed to read memory. And I want to use OpenOCD to debug the kernel.Thanks !!!