Placing Breakpoints in FreeBSD Kernel

Hello,

My first post in FreeBSD forum. I wanted to understand the FreeBSD code by following the execution sequence starting from booting the kernel.

To be more specific:
  1. I am running FreeBSD code on VM Player.
  2. I have compiled my custom kernel after enabling the options ::
    Code:
    options KDB, KDB_UNATTENDED, KDB_TRACE 
    options ALT_BREAK_TO_DEBUGGER
Now, I want to stop the kernel code and go step by step through the FreeBSD kernel. So, using GDB comes to mind. How can I place breakpoints in FreeBSD kernel through VM Player, or is this even possible using VM Player to understand FreeBSD kernel and the sequence of steps that take place during FreeBSD kernel boot?

Please let me know if I am going in the right direction to understand FreeBSD kernel, or there is some better approach for the same.

Thanks,
Shehbaz
 
Back
Top