From owner-svn-doc-all@freebsd.org Fri Mar 9 19:22:35 2018 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3828EF44AB4; Fri, 9 Mar 2018 19:22:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89E9D68214; Fri, 9 Mar 2018 19:22:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 91EF510A8BA; Fri, 9 Mar 2018 14:22:27 -0500 (EST) From: John Baldwin To: Benjamin Kaduk 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 Date: Fri, 09 Mar 2018 10:37:26 -0800 Message-ID: <3862948.D1s2xhDMta@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201803090206.w2926dFn037115@repo.freebsd.org> References: <201803090206.w2926dFn037115@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 09 Mar 2018 14:22:27 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 19:22:35 -0000 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 > > 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 @@ > > This section covers &man.kgdb.1; as found in &os; 5.3 > and later. In previous versions, one must use > - gdb -k to read a core dump file. > + gdb -k to read a core dump file. > + Since &os; 12 kgdb is acquired by installing > + devel/gdb. All mention of gdb -k should probably be axed as well. Thanks for updating this. > > > 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 kernel.debug) and the path > to the source files used to build your kernel (normally > - /usr/obj/usr/src/sys/KERNCONF, > - where KERNCONF > + /usr/obj/usr/src/sys/KERNCONF > + or > + /usr/obj/usr/src/amd64.amd64/sys/KERNCONF, > + where amd64.amd64 > + is the architecture and > + KERNCONF > is the ident specified in a kernel > &man.config.5;). With those two pieces of info, let the > debugging commence! 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. -- John Baldwin