From owner-freebsd-arm@freebsd.org Tue Jun 26 09:07:38 2018 Return-Path: Delivered-To: freebsd-arm@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 E0614101D26B for ; Tue, 26 Jun 2018 09:07:38 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from ppp150-101-221-139.static.internode.on.net (2001-44b8-4170-0a00-0000-0000-0000-0002.static.ipv6.internode.on.net [IPv6:2001:44b8:4170:a00::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "150.101.221.139", Issuer "Bunya Technology Certification Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0855D88726; Tue, 26 Jun 2018 09:07:37 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) X-Clacks-Overhead: GNU Terry Pratchett Received: from DHCP.tawonga.bunyatech.com.au (DHCP.tawonga.bunyatech.com.au [10.0.1.78] (may be forged)) (authenticated bits=0) by cope.tawonga.bunyatech.com.au (8.15.2/8.15.2/MSA) with ESMTPSA id w5Q97UX6042431 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Tue, 26 Jun 2018 19:07:30 +1000 (AEST) (envelope-from bscott@bunyatech.com.au) Subject: Re: [CFT] Newer kgdb bits for testing To: freebsd-arm@FreeBSD.org References: From: Brian Scott Message-ID: <1fdb19a5-412a-5a40-ad9c-07f2f7b326fa@bunyatech.com.au> Date: Tue, 26 Jun 2018 19:07:30 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 09:07:39 -0000 Not an expert on kgdb but I've been having a bit of a fight with it this week on my Raspberry-Pi. I've just built this and tested it on my 'problem' vmcore file. Worked like a dream. It confirmed an answer that had taken a lot of work for me to dig out with the existing version. Thanks for the work. Brian P.S. CC'ing you directly because the mail lists seem to dislike my email for some reason (some of the time). Must get around to investigating when I've got time. On 26/6/18 9:41 am, John Baldwin wrote: > At BSDCan I finally sat down and wrote a FreeBSD/arm kernel target for the > ports kgdb (GDB 8.1). It passed simple testing "live" on my little RPi, > but I haven't tested it against a vmcore. (In theory cross-debugging a > vmcore should Just Work(tm)). I'd like to default FreeBSD/arm to storing > the old gdb in /usr/libexec for use by crashinfo, but the ports kgdb needs > a bit more testing before we can throw the switch. > > To build the new kgdb, you can either apply the patches from > https://reviews.freebsd.org/D16013 to the devel/gdb port and rebuild > the port, or you can build gdb from the 'freebsd-8.1-kgdb' branch > of github.com/bsdjhb/gdb.git. > > One thing in particular I haven't been able to test yet is unwinding > across an in-kernel trapframe (for an exception taken while in the > kernel for example). It wasn't clear to me from reading the assembly > bits in exception.S if I need to pull the PC and LR values from a > different offset in struct trapframe for in-kernel trapframes vs > traps from userland. >