Debugging on OS X 10.11 with gdb-ia and icc 17.0 update 4
I'm trying to debug with gdb-ia code that I've compiled on my Mac running 10.11 (Xcode 7.6.3). It seems that gdb-ia will not longer look for symbols in the .o files but if I do as the documentation says, and run dsymutil on my executable that builds a .dSYM/ bundle and then gdb-ia will find the symbols from there. It actually prints something like:
jrb@gambino ~/Documents/code --> gdb-ia main
GNU gdb (GDB) 7.10-18.0.543
Copyright (C) 2015 Free Software Foundation, Inc; (C) 2016-2017 Intel Corp.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
Type "apropos word" to search for commands related to "word"...
Reading symbols from main...Reading symbols from /Users/jrb/Documents/code/main.dSYM/Contents/Resources/DWARF/main...done.
great for tiny test cases but I need to debug the executable when it is copied elsewhere and I don't want to copy the main.dSYM bundle there too. gdb has a -s (or -symbol) option that says "read the symbols from this file" but I cannot get that to work. I have tried these variations and none
jrb@gambino ~/Documents --> gdb-ia -s ~/Documents/code/main.dSYM main
jrb@gambino ~/Documents --> gdb-ia -symbols ~/Documents/code/main.dSYM/Contents/Resources/DWARF/main main
jrb@gambino ~/Documents --> gdb-ia --symbols=~/Documents/code/main.dSYM/Contents/Resources/DWARF/main main
These don't read the dSYM bundle. How do I make gdb-ia find that bundle and read it?