Author Topic: Debugger error High Sierra  (Read 7556 times)


  • Newbie
  • Posts: 2
Debugger error High Sierra
« 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
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:
Initialization output:

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?


  • Hero Member
  • *****
  • Posts: 2737
Re: Debugger error High Sierra
« Reply #1 on: April 11, 2018, 05:45:47 pm »
I am at a loss about this. Can anyone help? Anyone else get this error?,40814.0.html

This question gets asked regularly. Search the forum if that link doesn't help.


  • Newbie
  • Posts: 2
Re: Debugger error High Sierra
« Reply #2 on: April 12, 2018, 12:04:26 pm »
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.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 991
Re: Debugger error High Sierra
« Reply #3 on: April 15, 2018, 08:04:11 pm »
According to, gdb 8.1 does not work on High Sierra, but 8.0.1 does.


  • Hero Member
  • *****
  • Posts: 2077
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Debugger error High Sierra
« Reply #4 on: April 21, 2018, 05:55:21 am »
Good catch Jonas
I have quoted you on

Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project -


  • New Member
  • *
  • Posts: 21
Re: Debugger error High Sierra
« Reply #5 on: May 21, 2018, 08:22:57 pm »

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.



TinyPortal © 2005-2018