From owner-freebsd-arm@FreeBSD.ORG Sat Mar 21 20:43:04 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78BCBE57 for ; Sat, 21 Mar 2015 20:43:04 +0000 (UTC) Received: from mout3.freenet.de (mout3.freenet.de [IPv6:2001:748:100:40::2:5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.freenet.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32E9A93B for ; Sat, 21 Mar 2015 20:43:04 +0000 (UTC) Received: from [195.4.92.141] (helo=mjail1.freenet.de) by mout3.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (port 25) (Exim 4.82 #2) id 1YZQEW-0000wR-6w for freebsd-arm@freebsd.org; Sat, 21 Mar 2015 21:43:00 +0100 Received: from localhost ([::1]:49500 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.82 #2) id 1YZQEV-0002Oc-Rb for freebsd-arm@freebsd.org; Sat, 21 Mar 2015 21:43:00 +0100 Received: from mx5.freenet.de ([195.4.92.15]:39556) by mjail1.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.82 #2) id 1YZQCD-0001Cv-Pu for freebsd-arm@freebsd.org; Sat, 21 Mar 2015 21:40:37 +0100 Received: from p5ddd4b97.dip0.t-ipconnect.de ([93.221.75.151]:57619 helo=[127.0.0.1]) by mx5.freenet.de with esmtpsa (ID freebsdnewbie@freenet.de) (TLSv1.2:DHE-RSA-AES128-SHA:128) (port 587) (Exim 4.82 #2) id 1YZQCD-0008IA-KP for freebsd-arm@freebsd.org; Sat, 21 Mar 2015 21:40:37 +0100 Message-ID: <550DD740.2070608@freenet.de> Date: Sat, 21 Mar 2015 21:40:32 +0100 From: =?UTF-8?B?TWFudWVsIFN0w7xobg==?= User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: remote kernel debugging Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 150321-1, 21.03.2015), Outbound message X-Antivirus-Status: Clean X-Originated-At: 93.221.75.151!57619 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2015 20:43:04 -0000 Hi, is it possible to debug the freebsd-kernel remotely on BBB? I'm following the developers-handbook, but I do not get it working: root@beaglebone:~ # sysctl debug.kdb.enter=1 debug.kdb.enter: 0KDB: enter: sysctl debug.kdb.enter [ thread pid 655 tid 100087 ] Stopped at $d.11: ldrb r15, [r15, r15, ror r15]! db> gdb The remote GDB backend could not be selected. root@beaglebone:~ # dmesg GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2015 The FreeBSD Project. [...] On the remote host: /usr/obj/usr/src/sys/BBB # kgdb -v -r /dev/cuaU0 -b 115200 kernel.debug kgdb: device file: /dev/cuaU0 kgdb: kernel image: kernel.debug GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "armv6hf-marcel-freebsd"...Switching to remote protocol Couldn't establish connection to remote target Malformed response to offset query, qOffsets Kernel-Configuration BBB: # Debugging for use in -current makeoptions DEBUG=-g options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT options KDB # For minimum debugger support (stable branch) use: #options KDB_TRACE # For full debugger support use this instead: options DDB #options INVARIANTS #options INVARIANT_SUPPORT #options WITNESS #options WITNESS_SKIPSPIN #options DIAGNOSTIC options GDB I'm finding in the web that it is necessary to set someting like hint.uart.0.flags"0x90" but i do not find any flag like this in sysctl on BBB. Any hints what I'm doing wrong? Thanks.