From owner-freebsd-arm@freebsd.org Tue Jan 24 03:43:39 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 8A465CBF9C3 for ; Tue, 24 Jan 2017 03:43:39 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (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 1B7ECAD5 for ; Tue, 24 Jan 2017 03:43:39 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id d140so31430758wmd.2 for ; Mon, 23 Jan 2017 19:43:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:references:to:reply-to:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=cOUs8MlM0ieZFEs1cJmEAQWaCf9sC51g1E74Z98LMVQ=; b=Z0psUQ+a2SAVXtHa0pqi8wvLalIbVHSeXsZBI2QOzn7UDepED7Jq8iGjeDHfEgBZJa VdIRlhwZ1mf1qWEKkSyt8EASLLyR1BB3Vg2u4JnKc3yKpbr27Ww3l5hATh0SBmNoWlNU s5caMItr75diYL7JFQf0MRKszzxcXIZNujhtxY/T+9FKtFqh24MWZf9j4Ux6B3rjRqDT qcS+xGiPhaiJD54Af9f6fTJF+xNAJXiqha5n38NxKux8oaBzsF47bcdq7cDdxwURc0+a IwMgltHLfe9kFLwbG397ZPvdSaVxfQkvivbUOSpi/A/2iw2rfO8zV13Wf+BYPVv2oi1H 71+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:references:to:reply-to:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=cOUs8MlM0ieZFEs1cJmEAQWaCf9sC51g1E74Z98LMVQ=; b=DgwDyydEH8tPYEoWfCtXjYpgeykcndx4nqjdob3vv+R2kUMq0fWFyX7NqWn9eG/of+ VnyvfEFH27Jte/gzTpP+jwlw1i7q/pXLpTGYOWS9UPLpLMKOHcWaLFyWK7IFRgrCtNu0 VusYc4jJA3l8F81kWG9CVTSayxrWqeT4n3CoR8YyZGX9y1fU8cfdMBXvLSXqxpBCkSaI RRU0zeRgNeht+n6JEwHluwd8k/fSGBysn7o0sDWj6jw9K/S/aYTALaDc8a1KUqw0YsBS j6sSTMBz4gKLO+tmta+6mc0Sy59DfPNERQN+WJ/JmwBBHZpsMlUi7vBagbjKkmyVS4yt hijg== X-Gm-Message-State: AIkVDXLXD5vAVkf2vkFtbxKprBYcP/rAEJig3g75OK378ArpCrfV13H8pkWBcAlY4y7B0Q== X-Received: by 10.223.129.196 with SMTP id 62mr28958714wra.43.1485229417327; Mon, 23 Jan 2017 19:43:37 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id z134sm23972202wmc.20.2017.01.23.19.43.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jan 2017 19:43:36 -0800 (PST) From: Michal Meloun X-Google-Original-From: Michal Meloun Subject: Re: lldb on BeagleBone Black 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> To: freebsd-arm@freebsd.org Reply-To: mmel@freebsd.org Message-ID: <82b64b54-d9cc-8cb6-6b6d-8817f1fbb4cc@freebsd.org> Date: Tue, 24 Jan 2017 04:43:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Tue, 24 Jan 2017 03:43:39 -0000 On 23.01.2017 18:36, Ed Maste wrote: > On 16 January 2017 at 09:20, Dr. Rolf Jansen wrote: >> >> 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. > > 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. > > -Ed There are more problems with LLDB. 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="ARM" works but I think that this is also very close to 32MB limit. 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 Michal