Lazarus
Installation => macOS / Mac OS X => Topic started by: Becca on April 11, 2018, 05:38:21 pm
-
I just installed Lazarus with gdb. Tried Run test with debugging and got a Debugger Error:
The GDB command:off
"-exec-run"
returned the error:
",msg="Unable to find Mach task port for process-id 2400:(os/kern) failure (0x5).
I have the Tools|Options|Debugger|General|Debugger_Startup_Options set to:
"--eval-command=startup-with-shell off" (quotes included)
When I just Run (which is for the first time using Lazarus) I get:
Debugger
Initialization output:
=cmd_param_changed,param="startup-with-shell",value="off"
so it seems as if the debugger startup option is being registered.
I also created a .gdbinit file in my home directory with the line:
set-startup-with-shell off
The Run test executes OK if I Run without Debugging.
I am at a loss about this. Can anyone help? Anyone else get this error?
-
I am at a loss about this. Can anyone help? Anyone else get this error?
https://forum.lazarus.freepascal.org/index.php/topic,40814.0.html
This question gets asked regularly. Search the forum if that link doesn't help.
-
I found that the (0x5) error noted in my original post above is indicative of a code signing problem. So I deleted the gdb certificate, recreated the gdb certificate (had to create a Login certificate, export it then import as a System certificate) then code signed the gdb binary (not the link at usr/local/bin/gdb. I originally signed this link and, re-checking myself steps, found that I had to sign the gdb binary).
codesign -fs gdb-cert /usr/local/Cellar/gdb/8.1/bin/gdb
Note that I used the "f" option to force sign the binary file because it had already been code signed by my previous installation attempt.
Then launch Lazarus (with Debugger_Startup_Options set to startup-with-shell off. I still get the same error message as enemy original post. (See attachment) I checked the 3 troubleshooting conditions in the GDB install wiki and all should be OK.
Note the location of the gdb binary on my (High Sierra) computer: /usr/local/Cellar/gdb/8.1/bin. Is this the location that others have for the binary? Have I still not signed the correct gdb file?
Thanks for any help. I'm still at a loss.
-
According to https://stackoverflow.com/questions/49001329/gdb-doesnt-work-on-macos-high-sierra-10-13-3, gdb 8.1 does not work on High Sierra, but 8.0.1 does.
-
Good catch Jonas
I have quoted you on http://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X
Davo
-
Hello,
There is a mistake in the option's syntax. It should be :
--eval-command="set startup-with-shell off"
Exactly as is, with " set in the right place.
Enjoy.