Forum > macOS / Mac OS X

GDB not working with Lazarus 2.2.6 on OSX 10.11 (El Capitan)


I've installed the latest stable FPC and Lazarus on El Capitan and installed GDB via brew install gdb, but if i set Lazarus to use GDB, then it simply dies with an error message, that GDB has stopped working.

LLDB works, but Lazarus' support for LLDB is still beta, so if it is possible, i would rather use GDB.

Any ideas?

Actually the "LLDB (with FpDebug)" is now considered the default and stable choice.

If you upgraded to xcode 15 already, then you may need the Lazarus 3.0 fixes branch. As a fix went in after the 3.0RC2 was tagged. If your xcode is before 15 it should work with any version.

I cannot upgrade XCode; on El Capitan, the latest XCode is 8.2.1.

I don't use Mac much myself, so I don't know the versions...

But if you have lldb then I recommend to use it. lldb+fpdebug was introduced in Lazarus 2.0 and has been proven stable since. (at least as stable as the gdb solution).

If not, well you need to supply more on the gdb issue (the actual gdb output / the crashed dlg may have a "more" button? or before doing F9, open menu View > ide internals > debug output ).
But if indeed gdb itself crashed, then there is little that can be done.
If you build it yourself, maybe build without assertions (in case it failed on an assertion, and I have seen cases, were the assertion were wrong, then again I don't know if the code after the assertion would have dealt withe the data...)

In any case if there are issues, you can try different debug info settings. Either dwarf-2 or dwarf-3.  Dwarf 2 is probably less likely to upset gdb.

It was GDB what was crashed, i do not recall a "more" button.

Thanks. I'll stick to LLDB then. But first i have to downgrade this self-upgraded thing...


[0] Message Index

Go to full version