From owner-freebsd-arm@freebsd.org Thu Feb 2 12:05:34 2017 Return-Path: Delivered-To: freebsd-arm@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 59DFACCD49E for ; Thu, 2 Feb 2017 12:05:34 +0000 (UTC) (envelope-from rj@obsigna.com) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E72181185 for ; Thu, 2 Feb 2017 12:05:33 +0000 (UTC) (envelope-from rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1486037131; l=1943; s=domk; d=obsigna.com; h=To:References:Content-Transfer-Encoding:Date:In-Reply-To:From: Subject:Mime-Version:Content-Type; bh=9HGcuLc5Su9vrqAqEAm+DGetGTg/zVhHLn+D/pcC6mo=; b=oKdKue4l28i94g3IiqlYUkn3coObomk/3agRGGsFtMGNvYBu0PzOq+IDeDBGKy0vsj O0SVmnETBjCBiFjhccURTPth/7rnJ8/Dnv8ZggMTxSVnMVCzwHRighMN5tNVqe21xLkm W8no4zCCIvl/ou4/6WePibWfoeTNnsf1OVf4Y= X-RZG-AUTH: :O2kGeEG7b/pS1EK7WHa0hxqKZr4lnx6UhT0M0o35iAdWtoM07Gt3wQHFGh0i99HgKKA= X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com (bb02b584.virtua.com.br [187.2.181.132]) by smtp.strato.de (RZmta 39.12 DYNA|AUTH) with ESMTPSA id j0a57ft12C5UXd3 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Thu, 2 Feb 2017 13:05:30 +0100 (CET) Received: from [192.168.222.9] (unknown [192.168.222.9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 5D5687506E74 for ; Thu, 2 Feb 2017 10:05:27 -0200 (BRST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1085) Subject: Re: lldb on BeagleBone Black From: "Dr. Rolf Jansen" In-Reply-To: <82b64b54-d9cc-8cb6-6b6d-8817f1fbb4cc@freebsd.org> Date: Thu, 2 Feb 2017 10:05:26 -0200 Content-Transfer-Encoding: quoted-printable Message-Id: <6C37E5FD-E574-40BB-8A61-A3857609EDE1@obsigna.com> References: <3DA2368D-AE7B-4D69-A634-2861D2EFA9AE@obsigna.com> <8FDE5FCC-9BA8-4601-A32E-04FBAB5FFBEA@obsigna.com> <0ee18ae6-7588-97c9-bc04-3ad83b0c33b3@freebsd.org> <34EB351A-3BA9-4D38-AF1C-96B065564C42@obsigna.com> <06672183-F0A6-47C9-AC53-091515CBEBC3@obsigna.com> <82b64b54-d9cc-8cb6-6b6d-8817f1fbb4cc@freebsd.org> To: freebsd-arm@freebsd.org X-Mailer: Apple Mail (2.1085) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 12:05:34 -0000 Am 24.01.2017 um 01:43 schrieb Michal Meloun: > On 23.01.2017 18:36, Ed Maste wrote: >> On 16 January 2017 at 09:20, Dr. Rolf Jansen wrote: >>>=20 >>> Building and installation of devel/llvm37 from the ports went well = without problems, however, lldb37 is only of minor usefulness since = stepping-into/over lines of code does not work. I can set breakpoint, = and execution stops fine on breakpoints, however, when I hit 'n' or 's', = the program simply continues execution in a normal fashion until end. >>=20 >> Yes. Single-stepping on ARM requires special support in the debugger, >> which does not yet exist in LLDB for FreeBSD. The good news is that >> there is a patch in review to add this support. I'm hoping to review, >> test and commit it this week to the upstream LLDB repository, and = I'll >> see about merging it into the LLDB in the FreeBSD base system from >> there. >>=20 >> -Ed >=20 > There are more problems with LLDB. >=20 > 1) Full LLVM suite, newer that 37, cannot be linked. The resultant = size > of shared library is bigger that 32MB, and our very old linker doesn't > implements big jump/call stubs. > For now, cmake .. -DLLVM_TARGETS_TO_BUILD=3D"ARM" works but I think = that > this is also very close to 32MB limit. >=20 >=20 > 2) LLDB uses UDF instruction as breakpoint, but FreeBSD kernel expects > BKPT (see g_arm_breakpoint_opcode in ProcessFreeBSD.cpp). That's why = you > get invalid opcode for single step (and/or breakpoint). My quick = attempt > to replace this with right BKPT opcode also failed, and I think that > this code also have problem with endianes. Unfortunately, I have no = free > time for this Finally, a build from SVN-trunk of LLDB went through on my BeagleBone = Black, and with that one single stepping works. I utilized ccmake in = order to configure -Os for the Release build. Best regards Rolf =20 Rolf=