public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* collect2, weak functions and .debug_line section.
@ 2003-10-16 17:09 Carlo Wood
  2003-10-16 17:10 ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Carlo Wood @ 2003-10-16 17:09 UTC (permalink / raw)
  To: libstdc++, gcc; +Cc: pinskia

There is a problem with debug information being used
from one object file and the assembly code from another
object file (both containing the "same" function)
that do not completely match, with screwed debug
info as a result.

For example, in mainline, libstdc++.so.6 contains
the code from .libs/demangle.o 's
_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_
function, but the .debug_line section info for
that function from the one found in .libs/string-inst.o

If we disassemble both functions then we see that
they are different - and as such, you cannot use
the debug_line info from one and the code from the
other.

--- string-inst.out     2003-10-16 17:49:34.334596248 +0200
+++ demangle.out        2003-10-16 17:48:49.136467408 +0200
@@ -25,12 +25,12 @@
   42:  89 44 24 04             mov    %eax,0x4(%esp,1)
   46:  e8 fc ff ff ff          call   47 <_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_+0x47>
   4b:  8b 06                   mov    (%esi),%eax
-  4d:  8b 55 0c                mov    0xc(%ebp),%edx
-  50:  8b 40 f4                mov    0xfffffff4(%eax),%eax
-  53:  89 54 24 0c             mov    %edx,0xc(%esp,1)
-  57:  31 d2                   xor    %edx,%edx
-  59:  89 7c 24 10             mov    %edi,0x10(%esp,1)
-  5d:  89 54 24 08             mov    %edx,0x8(%esp,1)
+  4d:  31 c9                   xor    %ecx,%ecx
+  4f:  8b 55 0c                mov    0xc(%ebp),%edx
+  52:  8b 40 f4                mov    0xfffffff4(%eax),%eax
+  55:  89 7c 24 10             mov    %edi,0x10(%esp,1)
+  59:  89 54 24 0c             mov    %edx,0xc(%esp,1)
+  5d:  89 4c 24 08             mov    %ecx,0x8(%esp,1)
   61:  89 44 24 04             mov    %eax,0x4(%esp,1)
   65:  89 34 24                mov    %esi,(%esp,1)
   68:  e8 fc ff ff ff          call   69 <_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_+0x69>

I am not sure how to report this in GNATS.
What component would this belong to?
Heh - I don't even know which mailinglist this belongs to :/

Does anyone have ideas of how to fix this?

-- 
Carlo Wood <carlo@alinoe.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-10-17 14:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-16 17:09 collect2, weak functions and .debug_line section Carlo Wood
2003-10-16 17:10 ` Daniel Jacobowitz
2003-10-16 17:12   ` Matt Austern
2003-10-16 17:18     ` SHT_GROUP COMDAT H. J. Lu
2003-10-17 14:54       ` Carlo Wood
2003-10-16 17:56     ` collect2, weak functions and .debug_line section Carlo Wood
2003-10-16 20:37   ` Jason Merrill
2003-10-17  4:34     ` Daniel Jacobowitz
2003-10-17  5:56       ` Jason Merrill
2003-10-17 15:48         ` Jason Merrill
2003-10-17 16:09           ` Carlo Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).