Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Mar 2018 18:18:05 -0600
From:      Benjamin Kaduk <bjk@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   Re: svn commit: r51474 - head/en_US.ISO8859-1/books/developers-handbook/kerneldebug
Message-ID:  <20180310001805.GL27850@mit.edu>
In-Reply-To: <3862948.D1s2xhDMta@ralph.baldwin.cx>
References:  <201803090206.w2926dFn037115@repo.freebsd.org> <3862948.D1s2xhDMta@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 09, 2018 at 10:37:26AM -0800, John Baldwin wrote:
> On Friday, March 09, 2018 02:06:39 AM Benjamin Kaduk wrote:
> > Author: bjk
> > Date: Fri Mar  9 02:06:39 2018
> > New Revision: 51474
> > URL: https://svnweb.freebsd.org/changeset/doc/51474
> > 
> > Log:
> >   Update kgdb instructions
> >   
> >   The port/package should be used now, and build system changes have
> >   moved the kernel images in the object tree to a new location (on
> >   newer systems)
> >   
> >   PR:		226015
> >   Submitted by:	Phil Eaton <philneaton95@gmail.com>
> > 
> > Modified:
> >   head/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml
> > 
> > Modified: head/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml
> > ==============================================================================
> > --- head/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml	Thu Mar  8 12:51:09 2018	(r51473)
> > +++ head/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.xml	Fri Mar  9 02:06:39 2018	(r51474)
> > @@ -169,7 +169,9 @@
> >      <note>
> >        <para>This section covers &man.kgdb.1; as found in &os;&nbsp;5.3
> >  	and later.  In previous versions, one must use
> > -	<command>gdb -k</command> to read a core dump file.</para>
> > +	<command>gdb -k</command> to read a core dump file.
> > +	Since &os;&nbsp;12 kgdb is acquired by installing
> > +	<package>devel/gdb</package>.</para>
> 
> All mention of gdb -k should probably be axed as well.  Thanks for updating this.

Good point.

> >      </note>
> >  
> >      <para>Once a dump has been obtained, getting useful information
> > @@ -178,8 +180,12 @@
> >        the crash dump, locate the debug version of your kernel
> >        (normally called <filename>kernel.debug</filename>) and the path
> >        to the source files used to build your kernel (normally
> > -      <filename>/usr/obj/usr/src/sys/<replaceable>KERNCONF</replaceable></filename>,
> > -      where <filename><replaceable>KERNCONF</replaceable></filename>
> > +      <filename>/usr/obj/usr/src/sys/<replaceable>KERNCONF</replaceable></filename>
> > +      or
> > +      <filename>/usr/obj/usr/src/<replaceable>amd64.amd64</replaceable>/sys/<replaceable>KERNCONF</replaceable></filename>,
> > +      where <filename><replaceable>amd64.amd64</replaceable></filename>
> > +      is the architecture and
> > +      <filename><replaceable>KERNCONF</replaceable></filename>
> >        is the <varname>ident</varname> specified in a kernel
> >        &man.config.5;).  With those two pieces of info, let the
> >        debugging commence!</para>
> 
> Hmm, I'd need to look at the larger context, but kgdb can usually find the
> matching kernel for you if you just use 'kgdb -n last' (using kgdb from
> ports).  Also, kernel.debug is the wrong thing to use now in the obj tree.
> You would want to use kernel.full, but even better is to run kgdb against the
> installed kernel binary (e.g. /boot/foo/kernel) and let it find the debug
> symbols in /usr/lib/debug/boot/foo/kernel.debug automatically.

Any chance you'd be able to do this?  My schedule is pretty booked
in the lead up to IETF 101.

-Ben



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180310001805.GL27850>