[Bug c++/56783] New: g++ does not supply signatures for gdb on g++ 4.7 versions

dick.guertin at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Mar 29 17:12:00 GMT 2013


             Bug #: 56783
           Summary: g++ does not supply signatures for gdb on g++ 4.7
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dick.guertin@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

Actual results:

dickguertin$ g++ -v
Using built-in specs.
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

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.

More information about the Gcc-bugs mailing list