Commit 4b260c20 by Benjamin Kosnik Committed by Benjamin Kosnik

abi.html: New.


2004-05-13  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/abi.html: New.
	* docs/html/abi.txt: Remove.
	* docs/html/documentation.html: Add link.
	* testsuite/Makefile.am: Add files.
	* testsuite/Makefile.in: Regenerated.
	* testsuite/abi_check.cc: Move and modify code into...
	* testsuite/testsuite_abi.cc: Add.
	* testsuite/testsuite_abi.h: Add.

	* docs/html/17_intro/TODO: Update.
	* include/bits/stl_pair.h: Format.

From-SVN: r81781
parent f8f456c6
2004-05-13 Benjamin Kosnik <bkoz@redhat.com>
* docs/html/abi.html: New.
* docs/html/abi.txt: Remove.
* docs/html/documentation.html: Add link.
* testsuite/Makefile.am: Add files.
* testsuite/Makefile.in: Regenerated.
* testsuite/abi_check.cc: Move and modify code into...
* testsuite/testsuite_abi.cc: Add.
* testsuite/testsuite_abi.h: Add.
* docs/html/17_intro/TODO: Update.
* include/bits/stl_pair.h: Format.
2004-05-06 Matthias Klose <doko@debian.org> 2004-05-06 Matthias Klose <doko@debian.org>
* include/backward/iterator.h: Add GPL copyright info, * include/backward/iterator.h: Add GPL copyright info,
......
...@@ -2,16 +2,13 @@ std::allocator ...@@ -2,16 +2,13 @@ std::allocator
- switch to mt_allocator with --enable-threads=posix. - switch to mt_allocator with --enable-threads=posix.
- Try to figure out a way to switch allocators in a more elegant
manner, and make the default allocator configurable.
- persistent allocator - persistent allocator
- global/extern allocator - global/extern allocator
std::string std::string
- re-design for multi-paradigm, meta string class solution incorporating COW - Policy-based design incorporating COW
vs. deep copy issues, MT scalability vs. deep copy issues, MT scalability
See Andrei Alexandrescu, June 2001, C/C++ Users Journal See Andrei Alexandrescu, June 2001, C/C++ Users Journal
"Generic<Programming>: A Policy-Based basic_string Implementation" "Generic<Programming>: A Policy-Based basic_string Implementation"
...@@ -53,8 +50,6 @@ std::locale ...@@ -53,8 +50,6 @@ std::locale
- minimize ctype convertion in data facets, see numpunct/num_put/num_get - minimize ctype convertion in data facets, see numpunct/num_put/num_get
- finish caching data facets and using the caches
std::basic_filebuf, 27_io std::basic_filebuf, 27_io
- wfilebuf, get variable-encoding working and tested, including - wfilebuf, get variable-encoding working and tested, including
...@@ -86,11 +81,11 @@ testsuite ...@@ -86,11 +81,11 @@ testsuite
- diffing generated output files - diffing generated output files
- provide testsuites for numerics.
- make check-abi needs to have full symbol checking. Scope the LSB - make check-abi needs to have full symbol checking. Scope the LSB
testsuite, see what's going on with the typeinfo etc. bits. testsuite, see what's going on with the typeinfo etc. bits.
- provide testsuites for numerics.
- try to do a better job of ABI testing, with instantiations of all - try to do a better job of ABI testing, with instantiations of all
standard-specified types checked, not just exported symbols. standard-specified types checked, not just exported symbols.
...@@ -140,9 +135,6 @@ Nathan's commentary on cantrip, http://www.cantrip.org/cheaders.html ...@@ -140,9 +135,6 @@ Nathan's commentary on cantrip, http://www.cantrip.org/cheaders.html
- auto_ptr: seems to be some disagreement on what is - auto_ptr: seems to be some disagreement on what is
standards-conformant behavior, specially on conversion operators. standards-conformant behavior, specially on conversion operators.
- looks like deque::get_allocator not standards conformant or deque
allocator non-standard.
- list::assignment operator needs const_cast - list::assignment operator needs const_cast
- a cleaner division between pointers-to-value_type and true iterators - a cleaner division between pointers-to-value_type and true iterators
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<ul> <ul>
<li><a href="17_intro/COPYING">License</a> <li><a href="17_intro/COPYING">License</a>
- GPL v2 license terms</li> - GPL v2 license terms</li>
<li><a href="abi.txt">ABI Policy and Guidelines</a></li> <li><a href="abi.html">ABI Policy and Guidelines</a></li>
<li><a href="17_intro/BUGS">BUGS</a></li> <li><a href="17_intro/BUGS">BUGS</a></li>
<li><a href="17_intro/PROBLEMS">PROBLEMS</a> <li><a href="17_intro/PROBLEMS">PROBLEMS</a>
- target-specific known issues</li> - target-specific known issues</li>
......
...@@ -63,9 +63,8 @@ ...@@ -63,9 +63,8 @@
namespace std namespace std
{ {
/// pair holds two objects of arbitrary type. /// pair holds two objects of arbitrary type.
template <class _T1, class _T2> template<class _T1, class _T2>
struct pair struct pair
{ {
typedef _T1 first_type; ///< @c first_type is the first bound type typedef _T1 first_type; ///< @c first_type is the first bound type
...@@ -79,51 +78,51 @@ namespace std ...@@ -79,51 +78,51 @@ namespace std
/** The default constructor creates @c first and @c second using their /** The default constructor creates @c first and @c second using their
* respective default constructors. */ * respective default constructors. */
pair() pair()
: first(), second() {} : first(), second() { }
/** Two objects may be passed to a @c pair constructor to be copied. */ /** Two objects may be passed to a @c pair constructor to be copied. */
pair(const _T1& __a, const _T2& __b) pair(const _T1& __a, const _T2& __b)
: first(__a), second(__b) {} : first(__a), second(__b) { }
/** There is also a templated copy ctor for the @c pair class itself. */ /** There is also a templated copy ctor for the @c pair class itself. */
template <class _U1, class _U2> template<class _U1, class _U2>
pair(const pair<_U1, _U2>& __p) pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) {} : first(__p.first), second(__p.second) { }
}; };
/// Two pairs of the same type are equal iff their members are equal. /// Two pairs of the same type are equal iff their members are equal.
template <class _T1, class _T2> template<class _T1, class _T2>
inline bool inline bool
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first == __y.first && __x.second == __y.second; } { return __x.first == __y.first && __x.second == __y.second; }
/// <http://gcc.gnu.org/onlinedocs/libstdc++/20_util/howto.html#pairlt> /// <http://gcc.gnu.org/onlinedocs/libstdc++/20_util/howto.html#pairlt>
template <class _T1, class _T2> template<class _T1, class _T2>
inline bool inline bool
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first < __y.first { return __x.first < __y.first
|| (!(__y.first < __x.first) && __x.second < __y.second); } || (!(__y.first < __x.first) && __x.second < __y.second); }
/// Uses @c operator== to find the result. /// Uses @c operator== to find the result.
template <class _T1, class _T2> template<class _T1, class _T2>
inline bool inline bool
operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x == __y); } { return !(__x == __y); }
/// Uses @c operator< to find the result. /// Uses @c operator< to find the result.
template <class _T1, class _T2> template<class _T1, class _T2>
inline bool inline bool
operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __y < __x; } { return __y < __x; }
/// Uses @c operator< to find the result. /// Uses @c operator< to find the result.
template <class _T1, class _T2> template<class _T1, class _T2>
inline bool inline bool
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__y < __x); } { return !(__y < __x); }
/// Uses @c operator< to find the result. /// Uses @c operator< to find the result.
template <class _T1, class _T2> template<class _T1, class _T2>
inline bool inline bool
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); } { return !(__x < __y); }
...@@ -138,18 +137,11 @@ namespace std ...@@ -138,18 +137,11 @@ namespace std
* but LWG issue #181 says they should be passed by const value. We follow * but LWG issue #181 says they should be passed by const value. We follow
* the LWG by default. * the LWG by default.
*/ */
template <class _T1, class _T2>
// _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 181. make_pair() unintended behavior // 181. make_pair() unintended behavior
inline pair<_T1, _T2> template<class _T1, class _T2>
make_pair(_T1 __x, _T2 __y) inline pair<_T1, _T2>
{ return pair<_T1, _T2>(__x, __y); } make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); }
} // namespace std } // namespace std
#endif /* _PAIR_H */ #endif /* _PAIR_H */
// Local Variables:
// mode:C++
// End:
...@@ -39,18 +39,14 @@ GLIBCXX_DIR=${glibcxx_builddir}/src/.libs ...@@ -39,18 +39,14 @@ GLIBCXX_DIR=${glibcxx_builddir}/src/.libs
CXXLINK = \ CXXLINK = \
$(LIBTOOL) --tag=CXX --mode=link $(CXX) \ $(LIBTOOL) --tag=CXX --mode=link $(CXX) \
-R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \ -R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lv3test -L. -o $@
# Generated lists of files to run. All of these names are valid make
# targets, if you wish to generate a list manually.
lists_of_files = \
testsuite_files \
testsuite_files_interactive \
testsuite_files_performance
## Build support library. ## Build support library.
noinst_LIBRARIES = libv3test.a noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc libv3test_a_SOURCES = \
testsuite_abi.cc \
testsuite_allocator.cc \
testsuite_hooks.cc
## Build support utilities. ## Build support utilities.
if GLIBCXX_TEST_ABI if GLIBCXX_TEST_ABI
...@@ -59,6 +55,7 @@ else ...@@ -59,6 +55,7 @@ else
noinst_PROGRAMS = noinst_PROGRAMS =
endif endif
abi_check_SOURCES = abi_check.cc abi_check_SOURCES = abi_check.cc
abi_check_DEPENDENCIES = libv3test.a
all-local: stamp_wchar testsuite_files all-local: stamp_wchar testsuite_files
...@@ -70,6 +67,14 @@ else ...@@ -70,6 +67,14 @@ else
stamp_wchar: stamp_wchar:
endif endif
# Generated lists of files to run. All of these names are valid make
# targets, if you wish to generate a list manually.
lists_of_files = \
testsuite_files \
testsuite_files_interactive \
testsuite_files_performance
# We need more things in site.exp, but automake completely controls the # We need more things in site.exp, but automake completely controls the
# creation of that file; there's no way to append to it without messing up # creation of that file; there's no way to append to it without messing up
# the dependancy chains. So we overrule automake. This rule is exactly # the dependancy chains. So we overrule automake. This rule is exactly
......
...@@ -58,8 +58,8 @@ ARFLAGS = cru ...@@ -58,8 +58,8 @@ ARFLAGS = cru
LIBRARIES = $(noinst_LIBRARIES) LIBRARIES = $(noinst_LIBRARIES)
libv3test_a_AR = $(AR) $(ARFLAGS) libv3test_a_AR = $(AR) $(ARFLAGS)
libv3test_a_LIBADD = libv3test_a_LIBADD =
am_libv3test_a_OBJECTS = testsuite_hooks.$(OBJEXT) \ am_libv3test_a_OBJECTS = testsuite_abi.$(OBJEXT) \
testsuite_allocator.$(OBJEXT) testsuite_allocator.$(OBJEXT) testsuite_hooks.$(OBJEXT)
libv3test_a_OBJECTS = $(am_libv3test_a_OBJECTS) libv3test_a_OBJECTS = $(am_libv3test_a_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS) PROGRAMS = $(noinst_PROGRAMS)
am_abi_check_OBJECTS = abi_check.$(OBJEXT) am_abi_check_OBJECTS = abi_check.$(OBJEXT)
...@@ -272,8 +272,16 @@ GLIBCXX_DIR = ${glibcxx_builddir}/src/.libs ...@@ -272,8 +272,16 @@ GLIBCXX_DIR = ${glibcxx_builddir}/src/.libs
CXXLINK = \ CXXLINK = \
$(LIBTOOL) --tag=CXX --mode=link $(CXX) \ $(LIBTOOL) --tag=CXX --mode=link $(CXX) \
-R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \ -R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lv3test -L. -o $@
noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = \
testsuite_abi.cc \
testsuite_allocator.cc \
testsuite_hooks.cc
abi_check_SOURCES = abi_check.cc
abi_check_DEPENDENCIES = libv3test.a
# Generated lists of files to run. All of these names are valid make # Generated lists of files to run. All of these names are valid make
# targets, if you wish to generate a list manually. # targets, if you wish to generate a list manually.
...@@ -282,9 +290,6 @@ lists_of_files = \ ...@@ -282,9 +290,6 @@ lists_of_files = \
testsuite_files_interactive \ testsuite_files_interactive \
testsuite_files_performance testsuite_files_performance
noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
abi_check_SOURCES = abi_check.cc
baseline_file = ${baseline_dir}/baseline_symbols.txt baseline_file = ${baseline_dir}/baseline_symbols.txt
extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
......
// -*- C++ -*-
// Copyright (C) 2004 Free Software Foundation, Inc.
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2, or (at
// your option) any later version.
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this library; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
// MA 02111-1307, USA.
// As a special exception, you may use this file as part of a free
// software library without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to
// produce an executable, this file does not by itself cause the
// resulting executable to be covered by the GNU General Public
// License. This exception does not however invalidate any other
// reasons why the executable file might be covered by the GNU General
// Public License.
// Benjamin Kosnik <bkoz@redhat.com>
#include <string>
#include <stdexcept>
#include <deque>
#include <ext/hash_map>
#include <cxxabi.h>
// Encapsulates symbol characteristics.
struct symbol
{
enum category { none, function, object, error };
enum designation { unknown, added, subtracted, compatible, incompatible };
enum compatibility
{
compat_type = 1,
compat_name = 2,
compat_size = 4,
compat_version = 8
};
category type;
std::string name;
std::string demangled_name;
int size;
std::string version_name;
designation status;
symbol() : type(none), size(0), status(unknown) { }
symbol(const symbol& other)
: type(other.type), name(other.name), demangled_name(other.demangled_name),
size(other.size), version_name(other.version_name),
status(other.status) { }
void
print() const;
void
init(std::string& data);
};
struct symbol_error : public std::logic_error
{
explicit symbol_error(const std::string& s) : std::logic_error(s) { }
};
typedef __gnu_cxx::hash_map<std::string, symbol> symbol_objects;
typedef std::deque<std::string> symbol_names;
typedef std::pair<symbol_names, symbol_objects> symbols;
// Check.
bool
check_version(const symbol& test, bool added = false);
bool
check_compatible(const symbol& lhs, const symbol& rhs, bool verbose = false);
// Examine.
bool
has_symbol(const std::string& mangled, const symbols& list) throw();
symbol&
get_symbol(const std::string& mangled, const symbols& list);
extern "C" void
examine_symbol(const char* name, const char* file);
extern "C" void
compare_symbols(const char* baseline_file, const char* test_file, bool verb);
// Util.
symbols
create_symbols(const char* file);
const char*
demangle(const std::string& mangled);
// Specialization.
namespace __gnu_cxx
{
using namespace std;
template<>
struct hash<string>
{
size_t operator()(const string& s) const
{
const collate<char>& c = use_facet<collate<char> >(locale::classic());
return c.hash(s.c_str(), s.c_str() + s.size());
}
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment