Recent

Author Topic: Installing GDB on MAC OS X  (Read 447 times)

cahlucas

  • Newbie
  • Posts: 2
Installing GDB on MAC OS X
« on: May 30, 2023, 11:51:55 pm »
Hi all,
I have a new macbook pro and have installed Free Pascal / Lazarus on it, but I miss the debugger GDB. I would like to install it, but I don't know where to start. Does anyone know how to download and install this program for MAC OS X? 

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9206
  • Debugger - SynEdit - and more
    • wiki
Re: Installing GDB on MAC OS X
« Reply #1 on: May 30, 2023, 11:56:33 pm »
Does LLDB not work for you? (There seem to be some cases with IIRC using outdated hardware....)


New MAC, will have LLDB supplied with the developer tools. The IDE supports this.

Preferences > Options > debugger backend:

There should be an entry for "LLDB with FpDbeug"
It needs the path to LLDB.
And then that should work.

dbannon

  • Hero Member
  • *****
  • Posts: 2522
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Installing GDB on MAC OS X
« Reply #2 on: May 31, 2023, 01:53:46 am »
There is some legacy information about installing and using gdb on the Mac. I certainly don't recommend it, its marked legacy for a reason. Some it it was written by me using Sierra and has not be tested on more current versions of the OS (or has been tested and failed). So, Martin_fr's advice is far more useful.

https://wiki.freepascal.org/Legacy_Information:_Installing_Lazarus_on_Mac#Installing_gdb

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

cahlucas

  • Newbie
  • Posts: 2
Re: Installing GDB on MAC OS X
« Reply #3 on: June 01, 2023, 12:43:14 am »
Does LLDB not work for you? (There seem to be some cases with IIRC using outdated hardware....)


New MAC, will have LLDB supplied with the developer tools. The IDE supports this.

Preferences > Options > debugger backend:

There should be an entry for "LLDB with FpDbeug"
It needs the path to LLDB.
And then that should work.

LLDB is now installed. It did come installed on my macbook, so I used it. According to Lazarus, this is beta software.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9206
  • Debugger - SynEdit - and more
    • wiki
Re: Installing GDB on MAC OS X
« Reply #4 on: June 01, 2023, 01:49:44 am »
LLDB is now installed. It did come installed on my macbook, so I used it. According to Lazarus, this is beta software.

For all I can say, the "Lldb with FpDebug" will give you way better results than any gdb based version. And be more stable.

The reason why it was marked "beta" is, that when it was new, it had way less testing than any of the other new comers.
The thing is, I (as the main author of it) only run some once off tests on it (and some few tests after bigger changes once a year or so). I don't actually use Mac at all. So there is no continuous testing from me. (Same was with GDB, only back then GDB was used on all platforms / still had differences on Mac....).
So the only quality feedback I have is the absence of bug reports. I know there are some people using it. I have no idea how many. So I never removed the beta (also I never was reminded of it, I don't get to see it).

But probably time to remove the beta.
After all, the lldb itself is not in our control. And the actual FpDebug part is mostly shared with FpDebug on other OS. So that part is well tested by now.

From all I can tell, lldb is way more stable than gdb. And any data inspection is done by FpDebug.


 

TinyPortal © 2005-2018