[MacPorts] #34491: add dsymutil to post-destroot in gdb compatible compilers

MacPorts noreply at macports.org
Sun Jun 10 11:43:50 PDT 2012


#34491: add dsymutil to post-destroot in gdb compatible compilers
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  Reporter:  sean.michael.farley@…                                                                                                                                                                                                        |       Owner:  macports-tickets@…                   
      Type:  defect                                                                                                                                                                                                                       |      Status:  closed                               
  Priority:  Normal                                                                                                                                                                                                                       |   Milestone:                                       
 Component:  ports                                                                                                                                                                                                                        |     Version:  2.1.0                                
Resolution:  fixed                                                                                                                                                                                                                        |    Keywords:  haspatch                             
      Port:  apple-gcc40, apple-gcc42, llvm-gcc42, llvm-2.9, llvm-3.0, llvm-3.1, llvm-3.2, clang-2.9, clang-3.0, clang-3.1, clang-3.2, dragonegg-3.0, dragonegg-3.1, dragonegg-3.2, g95, gcc42, gcc43, gcc44, gcc45, gcc46, gcc47, gcc48  |  
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Comment(by sean.michael.farley@…):

 Replying to [comment:14 jeremyhu@…]:
 > Yes, you can put debug symbols into the binary.  It's also possible to
 ship them separately from a stripped binary.
 >
 > I usually build debug versions like:
 > {{{
 > clang -g3 -gdwarf-2 -O0 -c test.c
 > clang -o test test.o
 > }}}
 >
 > test will have debug symbols in it.

 That's only for statically linked libraries. The problem here is that
 gcc4X builds shared libraries and the only way to keep the debugging
 symbols are with .dSYM bundles. Since MacPorts is shipping gcc4X without
 the .dSYM debugging blows up for *any* executable. Using your example:

 {{{
 $ gcc-mp-4.7 -g3 -gdwarf-2 -O0 -c test.c
 $ gcc-mp-4.7 -o test test.o
 }}}

 still produces the output:

 {{{
 $ gdb ./test
 GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC
 2012)
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you
 are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for
 details.
 This GDB was configured as "x86_64-apple-darwin"...No symbol table is
 loaded.  Use the "file" command.
 Breakpoint 1 (PetscError) pending.
 Reading symbols for shared libraries ..
 warning: Could not find object file
 "/Volumes/work/macports/var/macports/build/_Volumes_work_mports_dports_lang_gcc47/gcc47/work/build/x86_64
 -apple-darwin11/libgcc/_muldi3_s.o" - no debug information available for
 "../../../gcc-4.7.0/libgcc/libgcc2.c".


 warning: Could not find object file
 "/Volumes/work/macports/var/macports/build/_Volumes_work_mports_dports_lang_gcc47/gcc47/work/build/x86_64
 -apple-darwin11/libgcc/_negdi2_s.o" - no debug information available for
 "../../../gcc-4.7.0/libgcc/libgcc2.c".


 warning: Could not find object file
 "/Volumes/work/macports/var/macports/build/_Volumes_work_mports_dports_lang_gcc47/gcc47/work/build/x86_64
 -apple-darwin11/libgcc/_lshrdi3_s.o" - no debug information available for
 "../../../gcc-4.7.0/libgcc/libgcc2.c".


 warning: Could not find object file
 "/Volumes/work/macports/var/macports/build/_Volumes_work_mports_dports_lang_gcc47/gcc47/work/build/x86_64
 -apple-darwin11/libgcc/_ashldi3_s.o" - no debug information available for
 "../../../gcc-4.7.0/libgcc/libgcc2.c".
 }}}

 Full output and test.c are attached.

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


More information about the macports-tickets mailing list