From owner-freebsd-current@freebsd.org Fri Oct 2 14:39:08 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 85EA0A0DB2B for ; Fri, 2 Oct 2015 14:39:08 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5797B1842; Fri, 2 Oct 2015 14:39:08 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by pacex6 with SMTP id ex6so108460480pac.0; Fri, 02 Oct 2015 07:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=HDhEPk3nDzq2EaFFEJTCiEB517gKxsKLuzxNv4qmXjI=; b=QBRUhmJzw7f/gvUfJj7isDGTmjACg16sTVc1UdXsSaVQJjBp2GLXqXILeMvMax6Pzk p8zp86aYhkSVw4VJyqbvJurJ4t/OOPizRVLxgwLRGgYlTyWUMQXo8gn5Np4x9R1IsqLQ Wg/WZvK5doZQeAK+ApztWjWuBvYG+Y4LX/m0/3aI8jd578MIVc8RkVdFa1avgu37QbfH 2yEqYDa/iSRpqAOsXjMWCjHbHTdqBbmR/2SXbbYxlTWZT/UfXJeUP+sJe6IGtDwp+AXx DwwSBenlNxS2U0sbKEokl8oeQqhNQ+/GcwiGGlEECSq53ON35T6/AJIvTHpKSKbwNf+2 Rx5w== X-Received: by 10.66.139.231 with SMTP id rb7mr20299712pab.5.1443796747566; Fri, 02 Oct 2015 07:39:07 -0700 (PDT) Received: from ox (c-24-6-44-228.hsd1.ca.comcast.net. [24.6.44.228]) by smtp.gmail.com with ESMTPSA id ne10sm9749401pbc.96.2015.10.02.07.39.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Oct 2015 07:39:06 -0700 (PDT) Sender: Navdeep Parhar Date: Fri, 2 Oct 2015 07:39:01 -0700 From: Navdeep Parhar To: Andriy Gapon Cc: John Baldwin , freebsd-current@FreeBSD.org Subject: Re: kgdb ported to devel/gdb Message-ID: <20151002143901.GA16147@ox> Mail-Followup-To: Andriy Gapon , John Baldwin , freebsd-current@FreeBSD.org References: <2662739.EWKL7pkiRb@ralph.baldwin.cx> <560E21E1.6010002@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <560E21E1.6010002@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Fri, 02 Oct 2015 14:39:08 -0000 On Fri, Oct 02, 2015 at 09:19:13AM +0300, Andriy Gapon wrote: > On 01/09/2015 00:32, John Baldwin wrote: > > 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, > > first of all, thank you very much for this! > > I followed your instructions substituting freebsd-7.10-kgdb for > freebsd-7.9.1-kgdb branch (devel/gdb is also at version 7.10) and the build > process worked just fine. > However, when I try to use the new kgdb it works, but I get some annoying > diagnostics: > > ... Andriy, The patch is also available in D3727. I downloaded the raw diff from there, applied it to $PORTS/devel/gdb, and built it as a port (with the KGDB support option enabled of course). Everything works. Can you try that? https://reviews.freebsd.org/D3727 Regards, Navdeep