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

Re: kernel debugging question


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 15 May 2004 21:11:54 -0700 (PDT)

:Dear folks,
:
:I've set up serial GDB now and I'm using it with growing fascination to 
:explore the internal workings of the kernel. But what techniques are 
:there to see what's going on _before_ the call to Debugger() in 
:machdep.c (except staring at the code)?
:
:Regards,
:Sascha
:
:-- 
:http://yoyodyne.ath.cx

    You can actually run gdb on a live kernel like this:

    gdb -k /dev/mem /path/to/kernel.debug

    You can then use the 'proc' command to switch to a process (give it a
    pid), and do a stack backtrace.  That part only really works if the
    process is blocked on something (i.e. not running).

    But you can also dig around kernel globals and various data structures
    and that can be quite useful on a live system.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



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