learning freebsd kernel

Devin Teske devin.teske at fisglobal.com
Fri Apr 6 20:12:53 UTC 2012


> -----Original Message-----
> From: gahn [mailto:ipfreak at yahoo.com]
> Sent: Friday, April 06, 2012 1:02 PM
> To: Devin Teske; 'freebsd general questions'
> Subject: Re: learning freebsd kernel
> 
> thanks devin for the great tip. yeah, now i got core dumps...:)
> 
> but where is my "gdb" under that "debug.kdb.available"?
> 

I'm not sure I understand the question.

debug.kdb.available shows "ddb" for me

I usually use kgdb(1) for examining kernel core files.
-- 
Devin


> best
> 
> /gahn
> 
> 
> 
> ----- Original Message -----
> From: Devin Teske <devin.teske at fisglobal.com>
> To: 'gahn' <ipfreak at yahoo.com>; 'freebsd general questions' <freebsd-
> questions at freebsd.org>
> Cc:
> Sent: Friday, April 6, 2012 2:13 PM
> Subject: RE: learning freebsd kernel
> 
> 
> 
> > -----Original Message-----
> > From: owner-freebsd-questions at freebsd.org [mailto:owner-freebsd-
> > questions at freebsd.org] On Behalf Of gahn
> > Sent: Friday, April 06, 2012 11:05 AM
> > To: freebsd general questions
> > Subject: learning freebsd kernel
> >
> > hi gurus:
> >
> > how could i create the core dumps on freebsd kernel? i am trying to create a
> > kernel core dump on 8.1 but it didn't happen:
> >
> > # sysctl -w debug.kdb.panic=1
> >
> > well the system went panic, entered the mode db>. i did "reboot' but there
> was
> > no core/kernel dumps under /var/crash.
> >
> 
> Did you set the "dumpdev" directive in /etc/rc.conf?
> 
> % grep dumpdev /etc/defaults/rc.conf
> dumpdev="NO"            # Device name to crashdump to (or NO).
> savecore_flags=""       # Used if dumpdev is enabled above, and present.
> 
> You should set the value of dumpdev to your swap device.
> 
> You can get this value by executing the following:
> 
> awk '$3~/swap/{print $1}' /etc/fstab
> 
> Should produce something like "/dev/mfid0s1b" or "da0s1b" or "ada0s1b" or
> "ad0s1b" etc. depending on your RELEASE and hardware.
> 
> If the output is, for example, "/dev/mfid0s1b", you should add the following
to
> /etc/rc.conf:
> 
> dumpdev="/dev/mfid0s1b"
> 
> --
> Devin
> 
> 
> > the customized kernel has those information enabled:
> >
> > # Debugging for use in -current
> > options         KDB                     # Enable kernel debugger support.
> > options         DDB                     # Support DDB.
> > options         GDB                     # Support remote GDB.
> >
> > user at host:~:$ sysctl -a | grep debug.kdb
> > debug.kdb.stop_cpus: 1
> > debug.kdb.trap_code: 0
> > debug.kdb.trap: 0
> > debug.kdb.panic: 0
> > debug.kdb.enter: 0
> > debug.kdb.current: ddb
> > debug.kdb.available: ddb
> >
> >
> >
> > by the way, where is my gdb? on one of my company's machisne, it looks like
> > this:
> >
> > debug.kdb.available: ddb gdb
> >
> > thank you all
> >
> > /gahn
> > _______________________________________________
> > freebsd-questions at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questions-
> unsubscribe at freebsd.org"
> 
> _____________
> The information contained in this message is proprietary and/or confidential.
If
> you are not the intended recipient, please: (i) delete the message and all
copies;
> (ii) do not disclose, distribute or use the message in any manner; and (iii)
notify
> the sender immediately. In addition, please be aware that any message
> addressed to our domain is subject to archiving and review by persons other
than
> the intended recipient. Thank you.


_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.


More information about the freebsd-questions mailing list