Date: Thu, 2 Feb 2017 10:05:26 -0200 From: "Dr. Rolf Jansen" <rj@obsigna.com> To: freebsd-arm@freebsd.org Subject: Re: lldb on BeagleBone Black Message-ID: <6C37E5FD-E574-40BB-8A61-A3857609EDE1@obsigna.com> In-Reply-To: <82b64b54-d9cc-8cb6-6b6d-8817f1fbb4cc@freebsd.org> 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> <CAPyFy2A=3g7Nr3XcibCO6Yzbh7UYf=_mdSaoqkbaNxqeFn6zHg@mail.gmail.com> <82b64b54-d9cc-8cb6-6b6d-8817f1fbb4cc@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <rj@obsigna.com> 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 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 Rolf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6C37E5FD-E574-40BB-8A61-A3857609EDE1>
