#36727: gdb 7.5 BFD unknown load command & Unable to find Mach task port -------------------------+---------------------- Reporter: jb_duffy@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | -------------------------+---------------------- Comment (by thomas.fanghaenel@…): Same issue here. I have code-signed the executable, but am still getting the "Unable to find Mach task port" error when I try to run the executable in gdb. {{{ bash-3.2$ ~/local/bin/gdb a.out GNU gdb (GDB) 7.5.50.20130115 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 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-darwin11.4.2". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /Users/xxx/tmp/a.out...Reading symbols from /Users/xxx/tmp/a.out.dSYM/Contents/Resources/DWARF/a.out...done. done. (gdb) break main Breakpoint 1 at 0x100000f0b: file foo.c, line 5. (gdb) run Starting program: /Users/xxx/tmp/a.out Unable to find Mach task port for process-id 70913: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8)) (gdb) }}} Here's the information that I get back from codesign on the executable: {{{ bash-3.2$ codesign -d -v ~/local/bin/gdb Executable=/Users/xxx/local/bin/gdb Identifier=org.gnu.gdb Format=Mach-O thin (x86_64) CodeDirectory v=20100 size=31400 flags=0x0(none) hashes=1565+2 location=embedded Signature size=1605 Signed Time=Jan 15, 2013 1:24:47 PM Info.plist entries=4 Sealed Resources=none Internal requirements count=1 size=88 }}} The only difference I can see between the default gdb executable and the one I built are, as Dave pointed out, the extra permissions. Any pointers anybody? -- Ticket URL: <https://trac.macports.org/ticket/36727#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS