gbd on Mavericks.... so close.... lazarus / 12-Debugger ---------------------------------------------------------------------- JimKueneman · 2013-11-19 01:19 I followed the direction here: http://wiki.freepascal.org/GDB_on_OS_X_Mavericks_and_Xcode_5 All went as planned.... except QuoteThe GDB command: "-exec-run" returned the error: ",msg="Unable to find Mach task port for process-id 451: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated()"" It seems like it is signed so what could be wrong? QuoteJim-iMac:python jimkueneman$ codesign -vvv /usr/local/bin/gdb /usr/local/bin/gdb: valid on disk /usr/local/bin/gdb: satisfies its Designated Requirement Tools->Options>Debugger->Debugger Path = /usr/local/bin/gdb I do notice that this gdb file is a hardlink to the actual executable that homebrew compiled. Jim ---------------------------------------------------------------------- skalogryz · 2013-11-19 13:46 could you please try to "sudo" lazarus? ---------------------------------------------------------------------- JimKueneman · 2013-11-20 10:36 Hi,    No go.  I ran Quotesudo open lazarus.app same error: QuoteThe GDB command: "-exec-run" returned the error: ",msg="Unable to find Mach task port for process-id 1121: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated()"" Jim ---------------------------------------------------------------------- JimKueneman · 2013-11-21 13:12 Any other thought what I can do?  If anyone is willing I am willing to run remote access of my iMac to try to figure this out. I am not well versed in OSX's internals so I am helpless. This will be a real roadblock for Lazarus on a Mac if this is an issue. Thanks, Jim ---------------------------------------------------------------------- marcov · 2013-11-21 13:59 Try to run GDB directly, then use the new gatekeeper exceptions dialog described Here to forcedly allow the last run blocked application. ---------------------------------------------------------------------- sysrpl · 2013-11-21 15:31 I have Mavericks installed and was able to setup debugging using macports: curl https://distfiles.macports.org/MacPorts/MacPorts-2.2.1-10.9- Mavericks.pkg -o macports.pkg sudo installer -pkg macports.pkg -target / sudo port install gdb The debugger will then be located at: /opt/local/bin/ggdb You will need to sign ggdb using the steps provided here: http://www.opensource.apple.com/source/lldb/lldb-69/docs/code- signing.txt Substitute ggdb for lldb and it should work. ---------------------------------------------------------------------- JimKueneman · 2013-11-22 12:43 QuoteTry to run GDB directly, then use the new gatekeeper exceptions dialog described Here to forcedly allow the last run blocked application Ok I ran: Quoteopen /usr/local/bin/gdb and gdb opened right up: QuoteLast login: Wed Nov 20 03:32:16 on ttys005 Jim-iMac:~ jimkueneman$ /usr/local/Cellar/gdb/7.6.1/bin/gdb ; exit; GNU gdb (GDB) 7.6.1 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-apple-darwin13.0.0". For bug reporting instructions, please see: . (gdb) I run Lazarus and hit the Run button and I get this: QuoteThe GDB command: "-exec-run" returned the error: ",msg="Unable to find Mach task port for process-id 2406: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated()"" I am lost... sysrpl :   I think the home-brew compile and signing did everything that macports would do.  gdb is compiled and will run off the command line but not through Lazarus. BTW I am running the release candidate for 1.2. Not sure if this is of any help but here is the console logging if I try to compile and run the debugger: QuoteFree Pascal Compiler version 2.6.2 [2013/02/03] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Darwin for i386 Compiling OLCB_Commander.lpr OLCB_Commander.lpr(10,62) Hint: Unit "file_utilities" not used in OLCB_Commander OLCB_Commander.lpr(11,56) Hint: Unit "common_utilities" not used in OLCB_Commander OLCB_Commander.lpr(12,3) Hint: Unit "olcb_node" not used in OLCB_Commander OLCB_Commander.lpr(12,14) Hint: Unit "com_port_hub" not used in OLCB_Commander OLCB_Commander.lpr(12,28) Hint: Unit "form_thread_debug" not used in OLCB_Commander OLCB_Commander.lpr(12,47) Hint: Unit "form_config_mem_viewer" not used in OLCB_Commander OLCB_Commander.lpr(13,3) Hint: Unit "common_objects" not used in OLCB_Commander OLCB_Commander.lpr(13,19) Hint: Unit "form_awesome_throttle" not used in OLCB_Commander OLCB_Commander.lpr(13,42) Hint: Unit "form_awesome_throttle_deallocate_error" not used in OLCB_Commander OLCB_Commander.lpr(14,3) Hint: Unit "form_awesome_throttle_duplicate_address" not used in OLCB_Commander OLCB_Commander.lpr(14,44) Hint: Unit "form_train_config_editor" not used in OLCB_Commander OLCB_Commander.lpr(15,3) Hint: Unit "unit_cdi_parser" not used in OLCB_Commander OLCB_Commander.lpr(15,20) Hint: Unit "olcb_defines" not used in OLCB_Commander OLCB_Commander.lpr(16,25) Hint: Unit "ethernet_hub" not used in OLCB_Commander Assembling (pipe) /Users/jimkueneman/Documents/openlcb/trunk/scratchpa ds/jkueneman/OlcbCommander/lib/i386-darwin/OLCB_Commander.s Compiling resource /Users/jimkueneman/Documents/openlcb/trunk/scratchp ads/jkueneman/OlcbCommander/lib/i386-darwin/OLCB_Commander.or Linking /Users/jimkueneman/Documents/openlcb/trunk/scratchpads/jkuenem an/OlcbCommander/Compiled_Binaries/i386-darwin/OlcbCommander 30 lines compiled, 3.8 sec 16 hint(s) issued [TCompiler.Compile] end TMainIDE.DoInitProjectRun ProgramFilename=/Users/jimkueneman/Documents /openlcb/trunk/scratchpads/jkueneman/OlcbCommander/Compiled_Binaries/i 386-darwin/OlcbCommander [TCmdLineDebugger] Debug PID: 2517 [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger [TMainIDE.DoRunProject] END TGDBMIDebugger.StartDebugging WorkingDir="/Users/jimkueneman/Documents /openlcb/trunk/scratchpads/jkueneman/OlcbCommander/Compiled_Binaries/i 386-darwin/" TCarbonBitBtn.SetFocus Error: SetKeyboardFocus  failed with result -30585 Then the Debugger Error dialog pops up. ---------------------------------------------------------------------- JimKueneman · 2013-11-23 02:58 Arrrggggg....  I missed this: Quoteopen the “Trust” item, and set “Code Signing” to “Always Trust”. For others this took me a while to find... http://www.mustangpeak.net/ggdb_on_mavericks.png Feel free to add this image to the Mavericks/XCode 5 page... Jim ---------------------------------------------------------------------- skalogryz · 2013-11-23 06:16 good to know. So even though gdb was signed, the certificate was not trusted enough. ---------------------------------------------------------------------- JimKueneman · 2013-11-23 12:21 Correct, "Use System Defaults" was not trusted enough.  I also removed home-brew and used MacPorts but I am sure what fixed it was this as the MacPorts build of ggdb had the same problem until I changed it to Always Trust. Jim ---------------------------------------------------------------------- danysz · 2014-03-26 07:02 For me is still not working and the certificate is signed "always trust" I just have gdb 7.7