From owner-freebsd-arm@freebsd.org Mon Jun 25 23:41:47 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 B3C571025086 for ; Mon, 25 Jun 2018 23:41:47 +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 67A1872C79 for ; Mon, 25 Jun 2018 23:41:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 7449910AFD2 for ; Mon, 25 Jun 2018 19:41:41 -0400 (EDT) To: freebsd-arm@FreeBSD.org From: John Baldwin Subject: [CFT] Newer kgdb bits for testing Message-ID: Date: Mon, 25 Jun 2018 16:41:40 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 25 Jun 2018 19:41:41 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean 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: Mon, 25 Jun 2018 23:41:47 -0000 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. -- John Baldwin