Debugging using LLDB on FreeBSD

General questions regarding the usage of CodeLite
karl_bsd
CodeLite Curious
Posts: 9
Joined: Sat May 02, 2020 1:47 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging using LLDB on FreeBSD

Post by karl_bsd »

In Settings -> LLDB Settings... there is an entry for "Debug Server Path".
But /usr/bin/lldb seems to be the wrong value.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Debugging using LLDB on FreeBSD

Post by DavidGH »

For me, testing in a fedora 32 virtualbox guest (where lldb debugging works OK) that field contains just 'lldb-server'. And doing, in a terminal:
which lldb-server
-> /usr/bin/lldb-server
karl_bsd
CodeLite Curious
Posts: 9
Joined: Sat May 02, 2020 1:47 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging using LLDB on FreeBSD

Post by karl_bsd »

I found also "lldb-server" on my system, and now there is much more activity in the logfile. It even seems, the debugger stops at the breakpoint. But then, it looks like debugging ends without a reason.
I guess there is something basically wrong. Most likely the build of codelite is something missing. Or FreeBSD is unsuitable for codelite, or FreeBSD's build of LLVM causes the problems...

regards,
karl
codelite.log
You do not have the required permissions to view the files attached to this post.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Debugging using LLDB on FreeBSD

Post by DavidGH »

But then, it looks like debugging ends without a reason.
It's not just you, or just FreeBSD. When I test CL builds on the various linux distros, I test its lldb too. About half work normally, but the rest behave as you found: breakpoints fail and/or the debugger exits. It's sometimes an intermittent problem: often the first attempt fails but the next one succeeds.

I've not spent time trying to work out why, partly because I suspect it will be difficult, but also because gdb 'just works' and I don't need two debuggers :) .
karl_bsd
CodeLite Curious
Posts: 9
Joined: Sat May 02, 2020 1:47 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging using LLDB on FreeBSD

Post by karl_bsd »

DavidGH wrote: Wed May 06, 2020 1:19 pm ... but also because gdb 'just works'....
"Of cource" gdb just didn't work either on my computer. Starting the debugger showed a messagebox saying something like: "Failed to locate the configured default terminal application...". Then, as a last desperate attempt, I started CodeLite as root and tried to debug a small program with gdb. It failed with the same error message.

BUT, after that, suddenly debugging works! I tried again under my normal user and suddenly CodeLite changed to debug view and stopped at the breakpoint. Much better: it uses lldb for debugging, something changed the project's debugger to lldb. I don't know why, but now it works. (maybe some global settings or initialisations needed root access?)

Anyway, thanks for your help!
regards,
karl
Post Reply