Page 2 of 2

Re: Debugging using LLDB on FreeBSD

Posted: Tue May 05, 2020 6:41 pm
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.

Re: Debugging using LLDB on FreeBSD

Posted: Tue May 05, 2020 8:27 pm
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

Re: Debugging using LLDB on FreeBSD

Posted: Wed May 06, 2020 12:33 pm
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

Re: Debugging using LLDB on FreeBSD

Posted: Wed May 06, 2020 1:19 pm
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 :) .

Re: Debugging using LLDB on FreeBSD

Posted: Mon May 11, 2020 2:52 am
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