Subject: Cygwin binutils packaging error? [was RE: C++filt grief.]
From: "Dave Korn" <[email-masked]>
To: "'Alan Modra'" <[email-masked]>
Cc: <[email-masked]>, <[email-masked]>
Date: Tue, 19 Oct 2004 12:12:50 +0100

> -----Original Message-----
> From: binutils-owner On Behalf Of Alan Modra
> Sent: 19 October 2004 02:33
> To: Dave Korn
> Cc: binutils
> Subject: Re: C++filt grief.
> 
> On Mon, Oct 18, 2004 at 04:05:59PM +0100, Dave Korn wrote:
> >   Although come to think of it, shouldn't c++filt be a bit 
> smarter about
> > this situation?  If you compile something with gcc and dump 
> the symbols with
> > nm, shouldn't what you get be suitable for feeding into 
> c++filt without
> > further processing?
> 
> It is, if you use the right target c++filt.

  Um.  I'm using the i686-pc-cygwin g++ and c++filt from the cygwin
distribution.  Binutils and gcc are packaged separately, so it's just
conceivable that they've been configured for different targets, but I would
have thought it rather unlikely.  Nonetheless, there's definitely something
not right here, and the only question is "But what?"

  Cygwin package maintainers, should cygwin's c++filt perhaps have
---strip-underscores as the default setting?  It appears to need it in order
to work with cygwin g++:

dk@mace /test/c++filt> cat foo.cpp

#include <iostream>
int main (int argc, const char ** argv)
{
  return 0;
}

dk@mace /test/c++filt> g++ foo.cpp -o foo.o -c
dk@mace /test/c++filt> nm foo.o
00000000 b .bss
00000000 d .ctors
00000000 d .data
00000000 d .dtors
00000000 r
.rdata$_ZNSt15basic_streambufIcSt11char_traitsIcEE13_S_pback_sizeE
00000000 t .text
00000080 t __GLOBAL__D_main
00000064 t __GLOBAL__I_main
00000026 t __Z41__static_initialization_and_destruction_0ii
00000000 R __ZNSt15basic_streambufIcSt11char_traitsIcEE13_S_pback_sizeE
         U __ZNSt8ios_base4InitC1Ev
         U __ZNSt8ios_base4InitD1Ev
00000000 b __ZSt8__ioinit
         U ___main
         U __alloca
00000000 T _main
dk@mace /test/c++filt> c++filt
__ZSt8__ioinit
__ZSt8__ioinit
__ZNSt8ios_base4InitD1Ev
__ZNSt8ios_base4InitD1Ev
__ZNSt8ios_base4InitC1Ev
__ZNSt8ios_base4InitC1Ev
__ZNSt15basic_streambufIcSt11char_traitsIcEE13_S_pback_sizeE
__ZNSt15basic_streambufIcSt11char_traitsIcEE13_S_pback_sizeE
__Z41__static_initialization_and_destruction_0ii
__Z41__static_initialization_and_destruction_0ii
__GLOBAL__I_main
__GLOBAL__I_main
__GLOBAL__D_main
__GLOBAL__D_main
dk@mace /test/c++filt> c++filt --strip-underscores
__ZSt8__ioinit
std::__ioinit
__ZNSt8ios_base4InitD1Ev
std::ios_base::Init::~Init()
__ZNSt8ios_base4InitC1Ev
std::ios_base::Init::Init()
__ZNSt15basic_streambufIcSt11char_traitsIcEE13_S_pback_sizeE
std::basic_streambuf<char, std::char_traits<char> >::_S_pback_size
__Z41__static_initialization_and_destruction_0ii
__static_initialization_and_destruction_0(int, int)
__GLOBAL__I_main
global constructors keyed to main
__GLOBAL__D_main
global destructors keyed to main
dk@mace /test/c++filt> which c++ c++filt
/usr/bin/c++
/usr/bin/c++filt
dk@mace /test/c++filt> c++filt --version
GNU c++filt 2.15.91 20040725
Copyright 2004 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
dk@mace /test/c++filt> g++ --version
g++ (GCC) 3.3.3 (cygwin special)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/