Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
[Solved] Lazarus - MacOS X - XCode 4.6.3 GDB files
Delphi, Lazarus, Free Pascal
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
October 28, 2014 10:16 PM
Thanks JoeByte!
Glad to hear it worked for you as well ... if only Apple would not have screwed around removing GDB ...
(@dawn)
New Member
Joined: 10 years ago
Posts: 2
November 8, 2014 1:44 AM
I can't open the actual debugger. How do I do it? If I try to click on the Lazarus icon in Safari, I should get some options, but all I really get is a loading screen.
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
November 8, 2014 11:40 PM
I'm not sure what you mean ... I'd love to help though.
To download GDB, click or right click the link in the first post of this topic (link). Once downloaded, follow the instructions in that post to unpack and install.
Once installed, Lazarus will call the GDB automatically when you run an application from Lazarus. Typically you will not see anything from GDB unless you're stepping through code or when something goes wrong.
I'm not sure what you mean with the "the Lazarus icon in Safari" ...?
(@messiashenrique)
New Member
Joined: 10 years ago
Posts: 1
December 11, 2014 4:44 PM
For convenience, I decided to create a package that does the all job alone.
Is attached.
[]`s
Messias Henrique
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
December 12, 2014 3:14 AM
Thanks Messias Henrique!
Slick!
(@acvoliveira)
New Member
Joined: 10 years ago
Posts: 2
March 3, 2015 9:28 AM
Hello all
Ive done everything on the tutorial above and it worked fine.
I tried to execute a little simple program to see if it would work in my computer.
Follow the programming code:
program example;
uses crt;
var
name : string;
begin
name:= hello ;
writeln(name);
readln;
end.
When I press play it returns with an error
There where 1 error compiling module, stopping.
Does anyone know why this happens?
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
March 3, 2015 11:06 AM
Hi Acvoliveira,
well, this could be for several reasons.
First of all, the compiling error of this code has not related to do with the debugger - there is something wrong with your code.
Second point is that this seems a command-line application - did you do the proper settings in the compiler settings for this?
(@acvoliveira)
New Member
Joined: 10 years ago
Posts: 2
March 3, 2015 11:34 AM
It could be my code, but I've everything the installation tutorial in many site wrote to do.
Is there a webpage explaining who to configure the compiler for this? I don't know if there is any misconfiguration because Larazus is finding all the write files to execute. But there could be some configuration that a I didn't do.
Can you help me with it, please?
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
(@dakab1)
New Member
Joined: 10 years ago
Posts: 1
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
May 9, 2015 12:33 AM
Thanks Dakab1 for leaving a positive feedback - glad it worked for you as well!
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
August 15, 2015 1:00 AM
Unfortunately, this trick no longer seems to work under El Capitan (Mac OS X 10.11).
I'm still trying to figure out the correct procedure to get a working GDB ...
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
August 15, 2015 3:09 AM
Alright! Found a trick that actually works!
We basically grab the GDB from XCode 4.x again ... just with a twist.
We cannot copy "gdb" in "/usr/bin", and we cannot copy "gdb-i386-apple-darwin" into "/usr/libexec/gdb" - El Capitan doesn't like that.
What we CAN do is rename "gdb-i386-apple-darwin" to "gdb" and copy it into "/usr/local/bin", and that my friends ... works! Even stepping through code works like a charm.
The file can be taken from the previous download or simply from the attached zip file where I already renamed the file - simply copy "gdb" from the zip file in "/usr/local/bin/".
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
July 27, 2016 1:04 AM
Note:
I just tried this with macOS Sierra Beta 2 ... and the trick works here as well ...
(@kenkelso)
Active Member
Joined: 11 years ago
Posts: 5
February 3, 2017 1:34 AM
I just tried this on Seirra 10.12.2 and can't get it to work, the debugger says it's timed out.
Does the gdb file need code signing?