Recent

Author Topic: GDB not working with Lazarus 2.2.6 on OSX 10.11 (El Capitan)  (Read 2229 times)

TCH

  • Full Member
  • ***
  • Posts: 200
GDB not working with Lazarus 2.2.6 on OSX 10.11 (El Capitan)
« on: October 10, 2023, 08:57:19 pm »
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?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9672
  • Debugger - SynEdit - and more
    • wiki
Re: GDB not working with Lazarus 2.2.6 on OSX 10.11 (El Capitan)
« Reply #1 on: October 10, 2023, 09:22:48 pm »
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.



TCH

  • Full Member
  • ***
  • Posts: 200
Re: GDB not working with Lazarus 2.2.6 on OSX 10.11 (El Capitan)
« Reply #2 on: October 10, 2023, 09:54:48 pm »
I cannot upgrade XCode; on El Capitan, the latest XCode is 8.2.1.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9672
  • Debugger - SynEdit - and more
    • wiki
Re: GDB not working with Lazarus 2.2.6 on OSX 10.11 (El Capitan)
« Reply #3 on: October 10, 2023, 10:27:59 pm »
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.

TCH

  • Full Member
  • ***
  • Posts: 200
Re: GDB not working with Lazarus 2.2.6 on OSX 10.11 (El Capitan)
« Reply #4 on: October 10, 2023, 10:34:51 pm »
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...

 

TinyPortal © 2005-2018