how to debug device driver module with gdb?

Hi all , I want to debug a device driver with gdb.
I try to use ddb with boot -d, but I can't examine stuct variable, could you tell me how to examine a struct variable in ddb and list all member variable of struct.
How to load a debug symbol for a driver module with ddb?
I have read this article https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-online-ddb.html , but I still don't know how to display all member variable of a struct
thanks a lot!
 
But the gdb can’t debug driver module, I know that the gdb can show the struct.
The ddb is integrated in kernel and don’t have print struct command.
i have to use examine to look at it by hand , it so tedious with it.
 
Back
Top