http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56783



--- Comment #2 from Dick Guertin <dick.guertin at gmail dot com> 2013-03-29 
17:57:43 UTC ---

(In reply to comment #1)

> Are you sure that this is not a bug in Apple's part of the toolchain and not

> g++?



I'm almost positive. But you need to define the term "toolchain" since that

doesn't make sense to me.  I know if I compile withthe -g option using the g++

version 4.0.1 on Tiger, and link the executable module, it can be debugged with

gdb on both Tiger AND Snow Leopard.  But if I compile with g++ version 4.2 or

above on Snow Leopard, the linked module can NOT be debugged.  I've used the

"maint" command with gdb to get the symbol-tables output on both Tiger and Snow

Leopard, the the object decks don't contain the same information.



Sorry to say, my research shows that the "g++" compiler on Snow Leopard no

longer places symbols in the linked module that have any meaning to "gdb". The

only symbols found are the made-up symbols created to make ALL symbols unique.

Here is a brief sample:



`_Z5DoSVCi', function, 0x151dd

`_Z7SEBTrapv', function, 0x1383c



Those same symbols in Tiger were like this:



`_Z5DoSVCi'  `DoSVC(int)', FUNCTION, 0x1394c

`_Z7SEBTrapv'  `SEBTrap()', FUNCTION, 0xf994



The "signature" is what "gdb" needs to resolve things like: break emsvc.c:DoSVC

Furthermore, you must still have all the "object decks", like emsvc.o, because

Snow Leopard's "g++" apparently does not carry the symbols in the linked module

anymore.

Reply via email to