From owner-freebsd-current@freebsd.org Mon Aug 31 21:33:32 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64DCA9C6EE9 for ; Mon, 31 Aug 2015 21:33:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (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 43AC11601 for ; Mon, 31 Aug 2015 21:33:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C9EB3B926 for ; Mon, 31 Aug 2015 17:33:30 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: kgdb ported to devel/gdb Date: Mon, 31 Aug 2015 14:32:04 -0700 Message-ID: <2662739.EWKL7pkiRb@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) 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.2.7 (bigwig.baldwin.cx); Mon, 31 Aug 2015 17:33:30 -0400 (EDT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 21:33:32 -0000 Over the past several months I have ported kgdb to the version of gdb in ports. I have a pending patch to the gdb port to add fork following, but once that is done (and possibly after updating to 7.10) I will try to add my existing work as a KGDB option on the port. Until such time, you can try the newer kgdb by checking out my branch from git. Here's my cheat sheet on how to build the newer kgdb. Note that if you build a world with my cross-libkvm patches you should get a kgdb that can debug i386 cores on amd64 and vice versa. All of the targets that the native devel/gdb support have their backends ported (so x86, sparc64, powerpc and powerpc64). I have not yet ported arm or mips since those don't work for userland yet in upstream gdb. I have only compiled non-x86 backends. Testing of the new kgdb on sparc64 and powerpc would be appreciated. Steps: % git clone https://github.com/bsdjhb/gdb.git % git checkout freebsd-7.9.1-kgdb % fetch http://www.freebsd.org/~jhb/gdb/build % pkg install devel/gdb # Having gdb installed will mean you get the python bindings in the right # place. % pkg install gmake # I think this is the only build tool you need? % ./build % cd obj # Replace 'obj' with 'obj.' for all but amd64 % gmake # ... wait You will now have a binary at 'obj/gdb/kgdb'. I just run it from my obj tree currently when testing. Once it becomes part of the port it will get installed as /usr/local/bin/kgdb791 or some such. -- John Baldwin