Date: Mon, 16 Jan 2017 12:20:45 -0200 From: "Dr. Rolf Jansen" <rj@obsigna.com> To: freebsd-arm@freebsd.org Subject: Re: lldb on BeagleBone Black Message-ID: <06672183-F0A6-47C9-AC53-091515CBEBC3@obsigna.com> In-Reply-To: <34EB351A-3BA9-4D38-AF1C-96B065564C42@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>
next in thread | previous in thread | raw e-mail | index | archive | help
> Am 13.01.2017 um 21:48 schrieb Dr. Rolf Jansen <rj@obsigna.com>: >> Am 11.01.2017 um 14:43 schrieb Michal Meloun = <melounmichal@gmail.com>: >> On 11.01.2017 14:20, Dr. Rolf Jansen wrote: >>>> Am 09.01.2017 um 00:59 schrieb Dr. Rolf Jansen <rj@obsigna.com>: >>>>=20 >>>> I am running FreeBSD 12.0-CURRENT (BEAGLEBONE) #0 r311461: Fri Jan = 6 03:13:01 UTC 2017 >>>>=20 >>>> Does any of the llvm ports build on the BBB? I am looking for a = working lldb, and pre-build packages are not available, and I fear there = is a certain reason why not -- perhaps build failures? >>>>=20 >>>> Therefore, is it actually possible to obtain a working lldb (with = gui option) for armv6 by building e.g. devel/llvm-devel on my BeagleBone = Black? >>>>=20 >>>> Which of the llvm-ports would be most promising? >>>=20 >>> I tried building devel/llvm-devel having the ports tree attached on = a fast USB disk. After 36 h of building it bailed out because of some = obscure error in the AArch64 code generator. >>>=20 >>> Finally, I don't think that building any LLVM port is viable on the = BBB, first because building takes forever. The BBB needs 1 minute for = compiling a C++ file which got only 20 lines of code. Of course this = comes because the C++ experts tend for some ingenious reasons to hide = all the implementations into the headers which need then to be compiled = again and again. Second, it doesn't make sense at all to build LLVM for = all the possible targets on a machine which I will never ever use for = cross-development. >>>=20 >>> I will now try a non-ports build of LLVM 3.91 for the armv6 target = only. >>>=20 >>> Best regards >>>=20 >>> Rolf >>=20 >> Latest buildable llvm is 37. Any newer fails with overflow for >> R_ARM_CALL relocation. >> Michal >=20 > Michal, thank you very much for your hint. >=20 > I started with the non-ports build of LLVM 3.91 for the ARM target = already once I received your message, and for the sake of satisfying my = curiosity I let it go. As a matter of fact, building and installing = completed successfully, only it took apprx. 48 h. >=20 > cmake .. -DLLVM_TARGETS_TO_BUILD=3D"ARM" -DCMAKE_BUILD_TYPE=3DRelease = -G Ninja > ninja lldb install >=20 > However, the resulting lldb fails to run any target, even the simplest = hello-world one crashes. >=20 > # lldb -- hello > (lldb) target create "hello" > Current executable set to 'hello' (arm). > (lldb) run > Process 592 launching > Process 592 launched: '/root/install/hello' (arm) > Process 592 stopped > * thread #1: tid =3D 100089, 0x000083a8 hello, stop reason =3D = signal SIGILL: illegal instruction > frame #0: 0x000083a8 hello > hello`: > -> 0x83a8 <+0>: mov r5, r2 > 0x83ac <+4>: mov r4, r1 > 0x83b0 <+8>: mov r3, r0 > 0x83b4 <+12>: ldr r0, [sp] >=20 >=20 > I am now building LLVM 37 from the ports on the BeagleBone Black = running FreeBSD 12.0-CURRENT. I will let you now the results. 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. Best regards Rolf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?06672183-F0A6-47C9-AC53-091515CBEBC3>