From: https://wiki.lazarus.freepascal.org/lldb
LLDB is now the standard debugger in the Lazarus IDE for macOS. The recommended setting is “Dwarf with sets”.
-gw -godwarfsets
and
Possible solution: What you can try is to use the
-godwarfcppcommand line option. Then FPC will encode in the debug information that it’s a C++ program which solves several of those issues.