This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

collect2, weak functions and .debug_line section.


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]