svn commit: r51474 - head/en_US.ISO8859-1/books/developers-handbook/kerneldebug
John Baldwin
jhb at freebsd.org
Sat Mar 10 01:31:45 UTC 2018
On Friday, March 09, 2018 06:18:05 PM Benjamin Kaduk wrote:
> 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 at 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; 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; 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.
Yeah, I'll try to take a stab.
--
John Baldwin
More information about the svn-doc-head
mailing list