DragonFly BSD
DragonFly kernel List (threaded) for 2004-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: New debug kernel installation mechanism committed to HEAD


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Oct 2004 00:29:14 -0700 (PDT)

: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
:gdb> bt
:...
:Andrew.

    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'.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]