How do I find the exact panic line number of a FreeBSD kernel?
I am testing a new driver on a FreeBSD kernel.
This may be trivial for experienced developers, but I cannot figure out a solution to this problem.
I have core panic, and when it panics, I get the flip side of panic.
In the opposite direction, it is said that the panic occurred while pronouncing foo_bar() + 0x94
. How can I extract a row that is not matching foo_bar() + 0x94
?
The kernel is built with debug symbols. I've tried grepping nm kernel
but it only contains debug symbols.
What can I do to find the exact string?
source to share
I suggest reading the FreeBSD Kernel Debugging Guide
https://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html
It details how to create the main file and how to invoke gdb.
source to share
Configure crashdumps - usually it just adds 'dumpdev = "AUTO"' to /etc/rc.conf and reboots - and after a crash and subsequent reboot analyzes the dump with a debugger, for example: "kgdb / boot / kernel / kernel / var / crash / vmcore.latest ". "Kgdb" is basically a GDB hacked to support kernel debugging; the "where" command should show you the backtrace.
source to share