LLDB on FreeBSD/arm64 and arm

Michał Górny mgorny at gentoo.org
Fri Feb 5 16:41:03 UTC 2021


On Fri, 2021-02-05 at 12:30 -0300, Dr. Rolf Jansen wrote:
> > Am 03.02.2021 um 14:53 schrieb Ed Maste <emaste at freebsd.org>:
> > 
> > As you may know, the FreeBSD Foundation sponsored Moritz Systems to
> > improve LLDB's support of non-x86 FreeBSD targets (and some other
> > improvements applicable to all targets). This builds on their
> > earlier
> > work to update x86 support.
> > 
> > Initial changes for arm64 and arm support were recently committed
> > upstream. Details are in these code reviews, if you're interested:
> > 
> > https://reviews.llvm.org/D95297 (arm64)
> > https://reviews.llvm.org/D95696 (arm)
> > 
> > arm and arm64 users with an interest in LLDB are encouraged to build
> > LLDB from the upstream git repository, try out the support, and
> > report
> > issues or positive results.
> > 
> > It should build using the regular build process as described at
> > https://lldb.llvm.org/resources/build.html
> > 
> > At present all four of 32- and 64-bit arm and x86 use LLDB's
> > non-legacy debug support by default. Legacy support will be removed
> > from LLDB upon completion of Moritz' work (once all architectures
> > are
> > patched) and there is no need to try out legacy support.
> 
> I am interested to build LLDB from the upstream repository. As a
> matter of fact a few years ago I did this already directly on a
> BeagleBone Black, however in the meantime the LLVM sources had grown
> beyond the capacity a BBB could compile. Already at that time a rather
> limited build took more than 48 hs.
> 
> I set up an ARMv7 cross building environment for kernel and world on a
> reasonably equipped i7 machine. Can I somehow use this for building
> LLDB as well?

Yes.  See our summary for some tips:

https://www.moritz.systems/blog/freebsd-remote-process-plugin-on-non-x86-architectures/

Go for 'Cross-compiling LLVM'.  On ARMv7, you'll have to change
the target and host triplets to armv7-unknown-freebsd13.0-gnueabihf
and LLVM target to ARM.

> I provided ssh root access to one of my BBBs to Michał Górny for
> testing his work, and he left a LLDB on the system, I don't know at
> which stage, though. When debugging an advanced project of mine with
> this one I see some show stoppers (as with the original LLDB).
> Perhaps, I could be of help to improve LLDB.

If it's about watchpoints, then we need to support them on kernel level
first.  For anything else, we need to figure out what's wrong/missing.

-- 
Best regards,
Michał Górny




More information about the freebsd-arm mailing list