diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ec0c5887b199..179b742289ad 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,13 @@
+2002-04-01 Phil Edwards Generated 2002-03-27. @LEVEL@-level docs, generated @DATE@. There are two types of documentation for libstdc++-v3. One is the
distribution documentation, which can be read online at
@@ -35,7 +35,14 @@
The other type is the source documentation, of which this is the first page.
- Here are quick links to the pages which we seem to use the most; a full
+ Both "user-level" and "maintainer-level" source
+ documentation is produced: user-level docs are for the users of this
+ library. The maint-level docs are for those interested in the underlying
+ workings of the library; they include all the user-level docs plus
+ additional notes and additional classes/functions/etc.
+ Here are quick links to the pages which we seem to use the most; a full
index is at the bottom:
These HTML pages are automatically generated, along with the man pages.
- The Makefile rule Documentation Overview
-
@@ -48,10 +55,10 @@
Generating this file
'make
- doxygen' in the libstdc++-v3 build directory generates these pages
- using a tool called, appropriately enough, Doxygen. To learn more about
- Doxygen, take a look at
+ The Makefile rules 'make doxygen' and
+ 'make doxygen-maint' in the libstdc++-v3 build directory
+ generates these pages using a tool called, appropriately enough, Doxygen.
+ To learn more about Doxygen, take a look at
${outdir}/html_${mode}/index.html
cp ${srcdir}/docs/doxygen/tables.html ${outdir}/html_${mode}/tables.html
echo ::
echo :: HTML pages begin with
diff --git a/libstdc++-v3/docs/html/17_intro/howto.html b/libstdc++-v3/docs/html/17_intro/howto.html
index 914213a37e79..21f83f97e696 100644
--- a/libstdc++-v3/docs/html/17_intro/howto.html
+++ b/libstdc++-v3/docs/html/17_intro/howto.html
@@ -205,7 +205,8 @@
classes publicly derived from it, simply returns the name of the
class. But they are the mangled names; you will need to call
c++filt and pass the names as command-line parameters to
- demangle them.
+ demangle them, or call a
+ runtime demangler function.
(The classes in <stdexcept> have constructors which
require an argument to use later for what() calls, so the
question does not arise in most user-defined exceptions.)
diff --git a/libstdc++-v3/docs/html/18_support/howto.html b/libstdc++-v3/docs/html/18_support/howto.html
index 13adbfd56fcb..10c74a9cbff9 100644
--- a/libstdc++-v3/docs/html/18_support/howto.html
+++ b/libstdc++-v3/docs/html/18_support/howto.html
@@ -31,6 +31,7 @@
@@ -255,6 +256,68 @@
to the FAQ.
If you have read the source
+ documentation for namespace abi then you are aware
+ of the cross-vendor C++ ABI which we use. One of the exposed
+ functions is the one which we use for demangling in programs like
+ c++filt, and you can use it yourself as well.
+
(The function itself might use different demanglers, but that's the + whole point of abstract interfaces. If we change the implementation, + you won't notice.) +
+Probably the only times you'll be interested in demangling at runtime
+ are when you're seeing typeid strings in RTTI, or when
+ you're handling the runtime-support exception classes. For example:
+
+#include <exception>
+#include <iostream>
+#include <cxxabi.h>
+
+struct empty { };
+
+template <typename T, int N>
+ struct bar { };
+
+
+int main()
+{
+ int status;
+ char *realname;
+
+ // exception classes not in <stdexcept>, thrown by the implementation
+ // instead of the user
+ std::bad_exception e;
+ realname = abi::__cxa_demangle(e.what(), 0, 0, &status);
+ std::cout << e.what() << "\t=> " << realname << "\t: " << status << '\n';
+ free(realname);
+
+
+ // typeid
+ bar<empty,17> u;
+ const std::type_info &ti = typeid(u);
+
+ realname = abi::__cxa_demangle(ti.name(), 0, 0, &status);
+ std::cout << ti.name() << "\t=> " << realname << "\t: " << status << '\n';
+ free(realname);
+
+ return 0;
+}
+ With GCC 3.1 and later, this prints
+ St13bad_exception => std::bad_exception : 0 + 3barI5emptyLi17EE => bar<empty, 17> : 0+ +
The demangler interface is described in the source documentation + linked to above. It is actually written in C, so you don't need to + be writing C++ in order to demangle C++. (That also means we have to + use crummy memory management facilities, so don't forget to free() + the returned char array.) +
+Return to top of page or + to the FAQ. +
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception index 45b98f26eb3f..b26cb6d887f1 100644 --- a/libstdc++-v3/libsupc++/exception +++ b/libstdc++-v3/libsupc++/exception @@ -105,7 +105,9 @@ namespace __gnu_cxx @code std::set_terminate (__gnu_cxx::__verbose_terminate_handler) @endcode - to use. */ + to use. For more info, see + http://gcc.gnu.org/onlinedocs/libstdc++/19_diagnostics/howto.html#4 + */ void __verbose_terminate_handler (); } // namespace __gnu_cxx