From eef57e077d4ba0cb7248776ddec8973ff0e2563d Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 25 Oct 2016 22:44:17 +0300 Subject: [PATCH] Docs regenerated --- boost/stacktrace/frame.html | 51 ++++++++ boost/stacktrace/iterator.html | 85 +++++++++++++ boost/stacktrace/stacktrace.html | 114 ++++++++++-------- boost/stacktrace/stacktrace/frame.html | 69 +++++++++++ .../build_macros_and_backends.html | 14 +-- boost_stacktrace/getting_started.html | 10 +- boost_stacktrace_header_reference.html | 14 ++- index.html | 8 +- standalone_HTML.manifest | 1 + 9 files changed, 297 insertions(+), 69 deletions(-) create mode 100644 boost/stacktrace/frame.html create mode 100644 boost/stacktrace/iterator.html create mode 100644 boost/stacktrace/stacktrace/frame.html diff --git a/boost/stacktrace/frame.html b/boost/stacktrace/frame.html new file mode 100644 index 0000000..787f51c --- /dev/null +++ b/boost/stacktrace/frame.html @@ -0,0 +1,51 @@ + + + +Class frame + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Class frame

+

boost::stacktrace::frame

+
+

Synopsis

+
// In header: <boost/stacktrace.hpp>
+
+
+class frame {
+};
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/stacktrace/iterator.html b/boost/stacktrace/iterator.html new file mode 100644 index 0000000..aa663da --- /dev/null +++ b/boost/stacktrace/iterator.html @@ -0,0 +1,85 @@ + + + +Class iterator + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Class iterator

+

boost::stacktrace::iterator

+
+

Synopsis

+
// In header: <boost/stacktrace.hpp>
+
+
+class iterator : public boost::iterator_facade< iterator, frame, boost::random_access_traversal_tag >
+{
+public:
+  // construct/copy/destruct
+  iterator(const stacktrace *, std::size_t) noexcept;
+
+  // private member functions
+  frame & dereference() const;
+  bool equal(const iterator &) const noexcept;
+  void increment() noexcept;
+  void decrement() noexcept;
+  void advance(std::size_t) noexcept;
+  base_t::difference_type distance_to(const iterator &) const;
+};
+
+

Description

+
+

+iterator + public + construct/copy/destruct

+
  1. iterator(const stacktrace * impl, std::size_t frame_no) noexcept;
+
+
+

+iterator private member functions

+
    +
  1. frame & dereference() const;
  2. +
  3. bool equal(const iterator & it) const noexcept;
  4. +
  5. void increment() noexcept;
  6. +
  7. void decrement() noexcept;
  8. +
  9. void advance(std::size_t n) noexcept;
  10. +
  11. base_t::difference_type distance_to(const iterator & it) const;
  12. +
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/stacktrace/stacktrace.html b/boost/stacktrace/stacktrace.html index 1f08ee5..af2df6a 100644 --- a/boost/stacktrace/stacktrace.html +++ b/boost/stacktrace/stacktrace.html @@ -7,6 +7,7 @@ + @@ -19,7 +20,7 @@

-PrevUpHome +PrevUpHomeNext
@@ -33,48 +34,80 @@ class stacktrace { public: - // construct/copy/destruct - stacktrace() noexcept; - stacktrace(const stacktrace &) noexcept; - stacktrace & operator=(const stacktrace &) noexcept; - ~stacktrace(); + // types + typedef frame value_type; + typedef iterator const_iterator; + typedef std::reverse_iterator< iterator > reverse_iterator; + typedef std::reverse_iterator< const_iterator > const_reverse_iterator; - // public member functions - std::size_t size() const noexcept; - std::string operator[](std::size_t) const; - explicit operator bool() noexcept; - bool operator<(const stacktrace &) const noexcept; - bool operator==(const stacktrace &) const noexcept; - std::size_t hash_code() const noexcept; + // member classes/structs/unions + + class frame { + public: + + // public member functions + std::string name() const; + std::string source_file() const; + std::size_t source_line() const noexcept; + }; + + // construct/copy/destruct + stacktrace() noexcept; + stacktrace(const stacktrace &) noexcept; + stacktrace & operator=(const stacktrace &) noexcept; + ~stacktrace(); + + // public member functions + const_iterator begin() const noexcept; + const_iterator cbegin() const noexcept; + const_iterator end() const noexcept; + const_iterator cend() const noexcept; + const_reverse_iterator rbegin() const noexcept; + const_reverse_iterator crbegin() const noexcept; + const_reverse_iterator rend() const noexcept; + const_reverse_iterator crend() const noexcept; + std::size_t size() const noexcept; + explicit operator bool() noexcept; + bool operator<(const stacktrace &) const noexcept; + bool operator==(const stacktrace &) const noexcept; + std::size_t hash_code() const noexcept; };
-

Description

+

Description

-

+

stacktrace public construct/copy/destruct

  1. -
    stacktrace() noexcept;
    Stores the current function call sequence inside the class.

    Complexity: O(N) where N is call seaquence length, O(1) for noop backend.

    +
    stacktrace() noexcept;
    Stores the current function call sequence inside the class.

    Complexity: O(N) where N is call seaquence length, O(1) for noop backend.

  2. -
    stacktrace(const stacktrace & bt) noexcept;
    +
    stacktrace(const stacktrace & bt) noexcept;
    Complexity: O(1)
  3. -
    stacktrace & operator=(const stacktrace & bt) noexcept;
    +
    stacktrace & operator=(const stacktrace & bt) noexcept;
    Complexity: O(1)
  4. -
    ~stacktrace();
    +
    ~stacktrace();
    Complexity: O(N) for libunwind, O(1) for other backends.
-

-stacktrace public member functions

+

+stacktrace public member functions

    +
  1. const_iterator begin() const noexcept;
  2. +
  3. const_iterator cbegin() const noexcept;
  4. +
  5. const_iterator end() const noexcept;
  6. +
  7. const_iterator cend() const noexcept;
  8. +
  9. const_reverse_iterator rbegin() const noexcept;
  10. +
  11. const_reverse_iterator crbegin() const noexcept;
  12. +
  13. const_reverse_iterator rend() const noexcept;
  14. +
  15. const_reverse_iterator crend() const noexcept;
  16. -
    std::size_t size() const noexcept;
    +
    std::size_t size() const noexcept;

    Complexity: O(1)

    @@ -86,27 +119,21 @@
  17. -
    std::string operator[](std::size_t frame) const;
    -

    +

    explicit operator bool() noexcept;
    Allows to check that stack trace capturing was successful.

    -Complexity: Amortized O(1), O(1) for noop backend.

    +Complexity: Amortized O(1), O(1) for noop backend. +Complexity: O(1)

    - - + + - + @@ -116,24 +143,13 @@

    Parameters:

    -- - - - -

    frame

    Zero based index of function to return. 0 is the function index where stacktrace was constructed and index close to this->size() contains function main().

    Returns:

    Function name in a human readable form.

    Returns:

    Function name in a human readable form.

    true if this->size() != 0

    Throws:

  18. -
    explicit operator bool() noexcept;
    Allows to check that stack trace capturing was successful.

    -Complexity: O(1)

    -
    -- - - - -

    Returns:

    true if this->size() != 0

    +
    bool operator<(const stacktrace & rhs) const noexcept;
    Compares stacktraces for less, order is platform dependant.

    Complexity: Amortized O(1); worst case O(size())

  19. -
    bool operator<(const stacktrace & rhs) const noexcept;
    Compares stacktraces for less, order is platform dependant.

    Complexity: Amortized O(1); worst case O(size())

    +
    bool operator==(const stacktrace & rhs) const noexcept;
    Compares stacktraces for equality.

    Complexity: Amortized O(1); worst case O(size())

  20. -
    bool operator==(const stacktrace & rhs) const noexcept;
    Compares stacktraces for equality.

    Complexity: Amortized O(1); worst case O(size())

    -
  21. -
  22. -
    std::size_t hash_code() const noexcept;
    Returns hashed code of the stacktrace.

    Complexity: O(1)

    +
    std::size_t hash_code() const noexcept;
    Returns hashed code of the stacktrace.

    Complexity: O(1)

@@ -149,7 +165,7 @@
-PrevUpHome +PrevUpHomeNext
diff --git a/boost/stacktrace/stacktrace/frame.html b/boost/stacktrace/stacktrace/frame.html new file mode 100644 index 0000000..322213c --- /dev/null +++ b/boost/stacktrace/stacktrace/frame.html @@ -0,0 +1,69 @@ + + + +Class frame + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHome +
+
+
+
+

Class frame

+

boost::stacktrace::stacktrace::frame

+
+

Synopsis

+
// In header: <boost/stacktrace.hpp>
+
+
+
+class frame {
+public:
+
+  // public member functions
+  std::string name() const;
+  std::string source_file() const;
+  std::size_t source_line() const noexcept;
+};
+
+

Description

+
+

+frame public member functions

+
    +
  1. std::string name() const;
  2. +
  3. std::string source_file() const;
  4. +
  5. std::size_t source_line() const noexcept;
  6. +
+
+
+
+ + + +
+
+
+PrevUpHome +
+ + diff --git a/boost_stacktrace/build_macros_and_backends.html b/boost_stacktrace/build_macros_and_backends.html index b656682..c21c20f 100644 --- a/boost_stacktrace/build_macros_and_backends.html +++ b/boost_stacktrace/build_macros_and_backends.html @@ -191,7 +191,7 @@

[a] - This will provide more readable backtraces if the binary is build + This will provide more readable backtraces if the binary is built with debug information.

[b] @@ -202,7 +202,7 @@


- You may use following macro to improve build times or to be able to switch + You may use the following macros to improve build times or to be able to switch backends without recompiling your project:

@@ -234,8 +234,8 @@

Disable header-only build and require linking with shared or static - library that has contains the tracing backend. If BOOST_ALL_DYN_LINK - is defined - link with shared library. + library that contains the tracing backend. If BOOST_ALL_DYN_LINK + is defined, then link with shared library.

@@ -248,7 +248,7 @@

Disable header-only build and require linking with shared library - that has contains tracing backend. + that contains tracing backend.

@@ -256,8 +256,8 @@

- If one of the link macros defined you have to manually link your binary with - one of the libraries that has the backend implementation: + If one of the link macros is defined, you have to manually link your binary + with one of the libraries that has the backend implementation:

- Pretty often assertions provide not enougth information to locate the problem. + Pretty often assertions provide not enough information to locate the problem. For example you can see the following message on out-of-range access:

../../../boost/array.hpp:123: T& boost::array<T, N>::operator[](boost::array<T, N>::size_type) [with T = int; long unsigned int N = 5ul]: Assertion '(i < N)&&("out of range")' failed.
 Aborted (core dumped)
 

- That's not enought to locate the problem without debugger. There may be thousends - code lines in real world examples and hundrets places where that assertion + That's not enough to locate the problem without debugger. There may be thousand + code lines in real world examples and hundred places where that assertion could happen. Let's try to improve the assertions, and make them more informative:

// BOOST_ENABLE_ASSERT_DEBUG_HANDLER is defined for the whole project
@@ -102,7 +102,7 @@
 18# ??
 

- Now we do know the steps that lead to the assertion and could find the error + Now we do know the steps that led to the assertion and can find the error without debugger.

@@ -303,7 +303,7 @@ to disable backtracing
  • - link with other backends to output becktraces + link with other backends to output backtraces
  • diff --git a/boost_stacktrace_header_reference.html b/boost_stacktrace_header_reference.html index b656fed..f1594a9 100644 --- a/boost_stacktrace_header_reference.html +++ b/boost_stacktrace_header_reference.html @@ -34,18 +34,24 @@ class stacktrace; // Additional comparison operators for stacktraces that have amortized O(1) complexity. - bool operator>(const stacktrace & lhs, const stacktrace & rhs); - bool operator<=(const stacktrace & lhs, const stacktrace & rhs); - bool operator>=(const stacktrace & lhs, const stacktrace & rhs); + bool operator>(const stacktrace & lhs, const stacktrace & rhs); + bool operator<=(const stacktrace & lhs, const stacktrace & rhs); + bool operator>=(const stacktrace & lhs, const stacktrace & rhs); bool operator!=(const stacktrace & lhs, const stacktrace & rhs); // Hashing support. std::size_t hash_value(const stacktrace & st); + // Outputs stacktrace::frame in a human readable format to output stream. + template<typename CharT, typename TraitsT> + std::basic_ostream< CharT, TraitsT > & + operator<<(std::basic_ostream< CharT, TraitsT > & os, + const stacktrace::frame & f); + // Outputs stacktrace in a human readable format to output stream. template<typename CharT, typename TraitsT> std::basic_ostream< CharT, TraitsT > & - operator<<(std::basic_ostream< CharT, TraitsT > & os, + operator<<(std::basic_ostream< CharT, TraitsT > & os, const stacktrace & bt); } } diff --git a/index.html b/index.html index 1f51070..3175a50 100644 --- a/index.html +++ b/index.html @@ -57,11 +57,11 @@

    How to display the call sequence in C++? From what function was called the - current function? What call sequence lead to an exception? + current function? What call sequence led to an exception?

    Boost.Stacktrace library is a simple library that provides information about - call sequence in human readable form. + call sequence in a human-readable form.

    @@ -72,13 +72,13 @@ This is not an official Boost library! It wasn't reviewed and can't be downloaded from www.boost.org. This library is available to the community to know real interest and get comments for refinement. The intention is to submit library - to formal review, if community think that it is interesting! + for formal review, if community thinks that it is interesting!

    - +

    Last revised: October 14, 2016 at 06:16:51 GMT

    Last revised: October 25, 2016 at 19:43:30 GMT


    diff --git a/standalone_HTML.manifest b/standalone_HTML.manifest index 9d32192..76fae2e 100644 --- a/standalone_HTML.manifest +++ b/standalone_HTML.manifest @@ -3,3 +3,4 @@ boost_stacktrace/getting_started.html boost_stacktrace/build_macros_and_backends.html boost_stacktrace_header_reference.html boost/stacktrace/stacktrace.html +boost/stacktrace/stacktrace/frame.html