New debug kernel installation mechanism committed to HEAD
dillon at apollo.backplane.com
Thu Oct 21 00:29:29 PDT 2004
:I like this plan much better than my strip-all-the-modules plan :)
:Btw, is there a how-to somewhere on how one would load a kernel module
:into gdb to do post-mortem on a vmcore? If one can't do this, then having
:debug info in modules would definitely be less useful.
:Should this work? -
:gdb -k kernel.0 vmcore.0
:gdb> add-symbol-file /nvidia.ko 0xc060d000
Theoretically that should work but I've never tried it. It would be
nice if it could be automated. I do not know if the FreeBSD guys have
made any progress integrating modules into the debugger.
If there is an existing gdb command that can be used we could create a
front-end gdb script procedure which extracts the module list and
loads the modules. e.g. take for example /usr/src/test/debug/gdb.kernel.
Those kinda of gdb script procedures are very powerful and could be used
for this purpose.
If someone were to verify that add-symbol-file or some similar gdb
command is effective here, and writes the gdb script to scan the module
list and issue the appropraite commands, I would be happy to commit it
into /usr/src/test/debug/gdb.kernel. If gdb has some sort of global
init file that it uses in addition to .gdbinit we could even build the
whole mess into the standard install so it 'just works'.
<dillon at xxxxxxxxxxxxx>
More information about the Kernel