This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [v3] RFC make check-abi, round 2


> > + const char*
> > + demangle(const std::string& mangled)
> > + {
> > +   const char* name;
> > +   if (mangled.find("_Z") == std::string::npos)
> > +     {
> > +       // This is not a mangled symbol, thus has "C" linkage.
> 
> Rather than searching the whole string in the "C" linkage case for a
> sequence we know will never be there, we could just
> 
>     if (mangled[0] != '_' && mangled[1] != 'Z')
>         // not mangled, etc

Done.

> > +   const char quote = '"';
> > +   const char bslash = '\\';
> > +   ostringstream cmd;
> > +   cmd << "readelf -s -W " << test_lib << " | sed '/" << bslash 
> > +       << ".dynsym/,/^$/p;d' | egrep -v ' (LOCAL|UND) ' | "
> > +       << "awk '{ if ($4 == " << quote << "FUNC" << quote << "|| $4 == " 
> > +       << quote << "NOTYPE" << quote << ") printf " << quote << "%s:%s"
> > +       << bslash << "n" << quote << ", $4, $8; else if ($4 == " 
> > +       << quote << "OBJECT" << quote << ") printf " << quote
> > +       << "%s:%s:%s" << bslash << "n" << quote << ", $4, $3, $8;}' | "
> > +       << "sort >& " << test_file;
> 
> My eyes are bleeding.  I'm almost sorry I suggested system() now; no idea
> it would be that much hassle to write.  You're a more tolerant man than I.

Sign of desperation... now you know why I was trying to get you to do
it... :) ... agreed that this interface is going to need some work. If
this is going to be extended to get vtable info and member data
alignment/offset of info, it'll need to get hacked anyway. 

I consider this, the arguments passed in to abi_check, and other bits
subject to evolution once this gets checked in.

At least now we have a quick way of knowing if things are trivially broken.

-benjamin


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