http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56783
Bug #: 56783 Summary: g++ does not supply signatures for gdb on g++ 4.7 versions Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: dick.guer...@gmail.com Steps to reproduce: On Snow Leopard, compile c-programs with -g option using g++ to create a linked module for execution. Use gdb to read the module, and attempt to set breakpoints. No symbols are found. g++ no longer places the "signatures" in the linked module, or the object decks, so gdb can't find the signatures to satisfy something like: break emsvc.c:DoSVC ; However, the same source compiled with g++ and linked on Tiger, when copied to Snow Leopard, can set breakpoints. Actual results: dickguertin$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/bin/../libexec/gcc/x86_64-apple-darwin11.4.0/4.7.1/lto-wrapper Target: x86_64-apple-darwin11.4.0 Configured with: ../gcc-4.7.1/configure --enable-languages=fortran Thread model: posix gcc version 4.7.1 (GCC) dickguertin$ gdb -q emg 2>/dev/null Reading symbols for shared libraries ..... done (gdb) maint print psymbols emg.sym (gdb) break emsvc.c:DoSVC Function "DoSVC" not defined in file emsvc.c. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) quit dickguertin$ Expected results: In the command sequence shown above, the breakpoint should have been set. The "maint" command creates a symbol-table text-file (emg.sym), which shows that the signatures are no longer included in either the object decks or linked module (emg). Similar commands on Tiger produce symbol-tables with signatures, and breakpoints can be found (and set) by gdb on Tiger, and even the gdb on Snow Leopard.