[MacPorts] #36727: gdb 7.5 BFD unknown load command & Unable to find Mach task port

MacPorts noreply at macports.org
Thu Oct 25 07:48:37 PDT 2012


#36727: gdb 7.5 BFD unknown load command & Unable to find Mach task port
------------------------------------+--------------------------------
 Reporter:  jb_duffy@…              |      Owner:  macports-tickets@…
     Type:  defect                  |     Status:  new
 Priority:  Normal                  |  Milestone:
Component:  ports                   |    Version:  2.1.2
 Keywords:  gdb BFD Mach task port  |       Port:  gdb
------------------------------------+--------------------------------
 Hi

 Mountain Lion OS X 10.8.2, XCode 4.5.1, MacBook Pro 2.4 GHz Intel Core i7,
 4 GB 1333 MHz DDR3

 I have successfully installed MacPorts gcc-mp-4.7. And, gdb 7.5 appears to
 have installed successfully. I can build a simple Hello World  C program
 but when I try to debug it with gdb I get one possibly two separate
 errors.

 Below is a sample build and debug session:

 {{{
 macbook:test john$ make
 gcc-mp-4.7 -Wall -std=c99 -pedantic -g -O0 hello.c -o hello
 macbook:test john$ ls -l
 total 40
 -rw-r--r--  1 john  staff    69 25 Oct 15:20 Makefile
 -rwxr-xr-x  1 john  staff  8756 25 Oct 15:22 hello
 -rw-r--r--  1 john  staff   110 25 Oct 15:22 hello.c
 drwxr-xr-x  3 john  staff   102 25 Oct 15:22 hello.dSYM
 macbook:test john$ ggdb hello
 GNU gdb (GDB) 7.5
 Copyright (C) 2012 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-darwin12.2.0".
 For bug reporting instructions, please see:
 <http://www.gnu.org/software/gdb/bugs/>...
 BFD: /Users/john/test/hello: unknown load command 0x2a
 BFD: /Users/john/test/hello: unknown load command 0x28
 BFD: /Users/john/test/hello: unknown load command 0x2b
 BFD: /Users/john/test/hello: unknown load command 0x2a
 BFD: /Users/john/test/hello: unknown load command 0x28
 BFD: /Users/john/test/hello: unknown load command 0x2b
 Reading symbols from /Users/john/test/hello...Reading symbols from
 /Users/john/test/hello.dSYM/Contents/Resources/DWARF/hello...done.
 done.
 (gdb) l 1
 1       #include <stdio.h>
 2       #include <stdlib.h>
 3
 4       int main(void)
 5       {
 6         printf("Hello, World!\n");
 7         exit(EXIT_SUCCESS);
 8       }
 (gdb) b 6
 Breakpoint 1 at 0x100000f62: file hello.c, line 6.
 (gdb) r
 Starting program: /Users/john/test/hello
 Unable to find Mach task port for process-id 77680: (os/kern) failure
 (0x5).
  (please check gdb is codesigned - see taskgated(8))
 (gdb) quit
 }}}


 Any help would be greatly appreciated with the BFD error and guidance on
 how to solve the code signing issue.

 Regards

 John

-- 
Ticket URL: <https://trac.macports.org/ticket/36727>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list