diff --git a/BOOST_STACKTRACE_DEFAULT_MAX_DEPTH.html b/BOOST_STACKTRACE_DEFAULT_MAX_DEPTH.html new file mode 100644 index 0000000..9d2fa8f --- /dev/null +++ b/BOOST_STACKTRACE_DEFAULT_MAX_DEPTH.html @@ -0,0 +1,54 @@ + + + +Macro BOOST_STACKTRACE_DEFAULT_MAX_DEPTH + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Macro BOOST_STACKTRACE_DEFAULT_MAX_DEPTH

+

BOOST_STACKTRACE_DEFAULT_MAX_DEPTH

+
+

Synopsis

+
// In header: <boost/stacktrace/stacktrace.hpp>
+
+BOOST_STACKTRACE_DEFAULT_MAX_DEPTH
+
+

Description

+

You may define this macro to some positive integer to limit the max stack frames count for the boost::stacktrace::stacktrace class. This macro does not affect the boost::stacktrace::basic_stacktrace.

+

Default: 100

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/stacktrace/basic_stacktrace.html b/boost/stacktrace/basic_stacktrace.html new file mode 100644 index 0000000..d36b0a5 --- /dev/null +++ b/boost/stacktrace/basic_stacktrace.html @@ -0,0 +1,244 @@ + + + +Class template basic_stacktrace + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Class template basic_stacktrace

+

boost::stacktrace::basic_stacktrace

+
+

Synopsis

+
// In header: <boost/stacktrace/stacktrace.hpp>
+
+template<std::size_t Depth> 
+class basic_stacktrace {
+public:
+  // types
+  typedef frame                                   reference;             
+  typedef boost::stacktrace::const_iterator       iterator;              
+  typedef boost::stacktrace::const_iterator       const_iterator;        
+  typedef std::reverse_iterator< iterator >       reverse_iterator;      
+  typedef std::reverse_iterator< const_iterator > const_reverse_iterator;
+
+  // construct/copy/destruct
+  basic_stacktrace() noexcept;
+  basic_stacktrace(const basic_stacktrace &) noexcept;
+  basic_stacktrace & operator=(const basic_stacktrace &) noexcept;
+  ~basic_stacktrace();
+
+  // public member functions
+  std::size_t size() const noexcept;
+  frame operator[](std::size_t) const noexcept;
+  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;
+  explicit operator bool() const noexcept;
+  bool empty() const noexcept;
+  bool operator<(const basic_stacktrace &) const noexcept;
+  bool operator==(const basic_stacktrace &) const noexcept;
+  std::size_t hash_code() const noexcept;
+
+  // public data members
+  static constexpr std::size_t max_depth;  // Max stack frames count that this class may hold. Equal to Depth template parameter. 
+};
+
+

Description

+

Class that on construction copies minimal information about call stack into its internals and provides access to that information. +

+
+

Template Parameters

+
  1. +
    std::size_t Depth
    +

    Max stack frames count that this class may hold. Equal to basic_stacktrace::max_depth.

    +
+
+
+

+basic_stacktrace + public + construct/copy/destruct

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

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

    +

    Async-Handler-Safety: Depends on backend, see "Build, Macros and Backends" section.

    +
  2. +
  3. +
    basic_stacktrace(const basic_stacktrace & st) noexcept;
    +

    Complexity: O(st.size())

    +

    Async-Handler-Safety: Safe.

    +
  4. +
  5. +
    basic_stacktrace & operator=(const basic_stacktrace & st) noexcept;
    +

    Complexity: O(st.size())

    +

    Async-Handler-Safety: Safe.

    +
  6. +
  7. +
    ~basic_stacktrace();
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  8. +
+
+
+

+basic_stacktrace public member functions

+
    +
  1. +
    std::size_t size() const noexcept;
    +

    +Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
    ++ + + + +

    Returns:

    Number of function names stored inside the class.

    +
  2. +
  3. +
    frame operator[](std::size_t frame_no) const noexcept;
    +

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

    +

    Async-Handler-Safety: Safe.

    +
    ++ + + + + + + + + + +

    Parameters:

    ++ + + + +

    frame_no

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

    Returns:

    frame that references the actual frame info, stored inside *this.

    +
  4. +
  5. +
    const_iterator begin() const noexcept;
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  6. +
  7. +
    const_iterator cbegin() const noexcept;
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  8. +
  9. +
    const_iterator end() const noexcept;
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  10. +
  11. +
    const_iterator cend() const noexcept;
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  12. +
  13. +
    const_reverse_iterator rbegin() const noexcept;
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  14. +
  15. +
    const_reverse_iterator crbegin() const noexcept;
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  16. +
  17. +
    const_reverse_iterator rend() const noexcept;
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  18. +
  19. +
    const_reverse_iterator crend() const noexcept;
    +

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

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

    +Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
    ++ + + + +

    Returns:

    true if this->size() != 0

    +
  22. +
  23. +
    bool empty() const noexcept;
    Allows to check that stack trace failed.

    +Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
    ++ + + + +

    Returns:

    true if this->size() == 0

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

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

    +

    Async-Handler-Safety: Safe.

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

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

    +

    Async-Handler-Safety: Safe.

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

    Complexity: O(1)

    +

    Async-Handler-Safety: Safe.

    +
  30. +
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/stacktrace/const_iterator.html b/boost/stacktrace/const_iterator.html index c3b5d08..71862b7 100644 --- a/boost/stacktrace/const_iterator.html +++ b/boost/stacktrace/const_iterator.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
-PrevUpHomeNext +PrevUpHomeNext
@@ -45,7 +45,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/boost/stacktrace/frame.html b/boost/stacktrace/frame.html index 48d0cba..d4c7c3b 100644 --- a/boost/stacktrace/frame.html +++ b/boost/stacktrace/frame.html @@ -25,7 +25,7 @@

Class frame

-

boost::stacktrace::frame — Non-owning class that references the frame information stored inside the boost::stacktrace::stacktrace class.

+

boost::stacktrace::frame — Non-owning class that references the frame information stored inside the boost::stacktrace::stacktrace class.

Synopsis

// In header: <boost/stacktrace/frame.hpp>
@@ -34,29 +34,29 @@
 class frame {
 public:
   // construct/copy/destruct
-  frame() noexcept;
-  frame(const frame &) = default;
-  explicit frame(const void *) noexcept;
-  frame & operator=(const frame &) = default;
+  frame() noexcept;
+  frame(const frame &) = default;
+  explicit frame(const void *) noexcept;
+  frame & operator=(const frame &) = default;
 
-  // public member functions
-  std::string name() const;
-  const void * address() const noexcept;
-  std::string source_file() const;
-  std::size_t source_line() const;
-  explicit operator bool() const noexcept;
-  bool empty() const noexcept;
+  // public member functions
+  std::string name() const;
+  const void * address() const noexcept;
+  std::string source_file() const;
+  std::size_t source_line() const;
+  explicit operator bool() const noexcept;
+  bool empty() const noexcept;
 };
-

Description

+

Description

-

+

frame public construct/copy/destruct

  1. -
    frame() noexcept;
    Constructs frame that references NULL address. Calls to source_file() and source_line() wil lreturn empty string. Calls to source_line() will return 0.

    Complexity: O(1).

    +
    frame() noexcept;
    Constructs frame that references NULL address. Calls to source_file() and source_line() wil lreturn empty string. Calls to source_line() will return 0.

    Complexity: O(1).

    Async-Handler-Safety: Safe.

    @@ -68,7 +68,7 @@
  2. -
    frame(const frame &) = default;
    Copy constructs frame.

    Complexity: O(1).

    +
    frame(const frame &) = default;
    Copy constructs frame.

    Complexity: O(1).

    Async-Handler-Safety: Safe.

    @@ -80,7 +80,7 @@
  3. -
    explicit frame(const void * addr) noexcept;
    Constructs frame that can extract information from addr at runtime.

    Complexity: O(1).

    +
    explicit frame(const void * addr) noexcept;
    Constructs frame that can extract information from addr at runtime.

    Complexity: O(1).

    Async-Handler-Safety: Safe.

    @@ -92,7 +92,7 @@
  4. -
    frame & operator=(const frame &) = default;
    Copy assigns frame.

    Complexity: O(1).

    +
    frame & operator=(const frame &) = default;
    Copy assigns frame.

    Complexity: O(1).

    Async-Handler-Safety: Safe.

    @@ -106,11 +106,11 @@
    -

    -frame public member functions

    +

    +frame public member functions

    1. -
      std::string name() const;
      +
      std::string name() const;

      Async-Handler-Safety: Unsafe.

      @@ -129,7 +129,7 @@
  5. -
    const void * address() const noexcept;
    +
    const void * address() const noexcept;

    Async-Handler-Safety: Safe.

    @@ -148,7 +148,7 @@
  • -
    std::string source_file() const;
    +
    std::string source_file() const;

    Async-Handler-Safety: Unsafe.

    @@ -167,7 +167,7 @@
  • -
    std::size_t source_line() const;
    +
    std::size_t source_line() const;

    Async-Handler-Safety: Unsafe.

    @@ -186,7 +186,7 @@
  • -
    explicit operator bool() const noexcept;
    Checks that frame is not references NULL address.

    +

    explicit operator bool() const noexcept;
    Checks that frame is not references NULL address.

    Complexity: O(1)

    Async-Handler-Safety: Safe.

    @@ -198,7 +198,7 @@
  • -
    bool empty() const noexcept;
    Checks that frame references NULL address.

    +

    bool empty() const noexcept;
    Checks that frame references NULL address.

    Complexity: O(1)

    Async-Handler-Safety: Safe.

    diff --git a/boost_stacktrace/build_macros_and_backends.html b/boost_stacktrace/build_macros_and_backends.html index 017f256..31157ea 100644 --- a/boost_stacktrace/build_macros_and_backends.html +++ b/boost_stacktrace/build_macros_and_backends.html @@ -226,7 +226,7 @@ that are exported by the binary.

    [c] - Absolutely safe to construct instances of boost::stacktrace::stacktrace + Absolutely safe to construct instances of boost::stacktrace::stacktrace in async signal handlers using that backend.

    diff --git a/boost_stacktrace/getting_started.html b/boost_stacktrace/getting_started.html index f27b8e6..987f8d6 100644 --- a/boost_stacktrace/getting_started.html +++ b/boost_stacktrace/getting_started.html @@ -46,7 +46,7 @@ to print current call stack

    - boost::stacktrace::stacktrace + boost::stacktrace::stacktrace contains methods for working with call-stack/backtraces/stacktraces. Here's a small example:

    @@ -65,7 +65,7 @@ stacktraces
  • - stacktrace() + stacktrace() is the default constructor call; constructor stores the current function call sequence inside the stacktrace class.
  • @@ -218,7 +218,7 @@ call our functions assertion_failed and assertion_failed_msg in case of failure. In assertion_failed_msg - we output information that was provided by the assertion macro and boost::stacktrace::stacktrace: + we output information that was provided by the assertion macro and boost::stacktrace::stacktrace:

    Expression 'i < N' is false in function 'T& boost::array<T, N>::operator[](boost::array<T, N>::size_type) [with T = int; long unsigned int N = 5ul]': out of range.
     Backtrace:
    @@ -366,7 +366,7 @@
           stacktraces by specified format
     
     

    - boost::stacktrace::stacktrace + boost::stacktrace::stacktrace provides access to individual frames of the stacktrace, so that you could save stacktrace information in your own format. Consider the example, that saves only function addresses of each diff --git a/boost_stacktrace_header_reference.html b/boost_stacktrace_header_reference.html index 31573b0..c623a3f 100644 --- a/boost_stacktrace_header_reference.html +++ b/boost_stacktrace_header_reference.html @@ -7,7 +7,7 @@ - +

    @@ -20,7 +20,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    +
    +
    +BOOST_STACKTRACE_DEFAULT_MAX_DEPTH
    namespace boost {
       namespace stacktrace {
    -    class stacktrace;
    +    template<std::size_t Depth> class basic_stacktrace;
    +
    +    typedef basic_stacktrace< BOOST_STACKTRACE_DEFAULT_MAX_DEPTH > stacktrace;
     
         // Comparison operators that provide platform dependant ordering and have amortized O(1) complexity; O(size()) worst case complexity; are Async-Handler-Safe. 
    -    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);
    +    template<std::size_t Depth> 
    +      bool operator>(const basic_stacktrace< Depth > & lhs, 
    +                     const basic_stacktrace< Depth > & rhs);
    +    template<std::size_t Depth> 
    +      bool operator<=(const basic_stacktrace< Depth > & lhs, 
    +                      const basic_stacktrace< Depth > & rhs);
    +    template<std::size_t Depth> 
    +      bool operator>=(const basic_stacktrace< Depth > & lhs, 
    +                      const basic_stacktrace< Depth > & rhs);
    +    template<std::size_t Depth> 
    +      bool operator!=(const basic_stacktrace< Depth > & lhs, 
    +                      const basic_stacktrace< Depth > & rhs);
     
         // Hashing support, O(1) complexity; Async-Handler-Safe. 
    -    std::size_t hash_value(const stacktrace & st);
    +    template<std::size_t Depth> 
    +      std::size_t hash_value(const basic_stacktrace< Depth > & st);
     
         // Outputs stacktrace in a human readable format to output stream; unsafe to use in async handlers. 
    -    template<typename CharT, typename TraitsT> 
    +    template<typename CharT, typename TraitsT, std::size_t Depth> 
           std::basic_ostream< CharT, TraitsT > & 
    -      operator<<(std::basic_ostream< CharT, TraitsT > & os, 
    -                 const stacktrace & bt);
    +      operator<<(std::basic_ostream< CharT, TraitsT > & os, 
    +                 const basic_stacktrace< Depth > & bt);
       }
     }
    @@ -71,23 +86,28 @@ class frame; // Comparison operators that provide platform dependant ordering and have O(1) complexity; are Async-Handler-Safe. - bool operator<(const frame & lhs, const frame & rhs); - bool operator>(const frame & lhs, const frame & rhs); - bool operator<=(const frame & lhs, const frame & rhs); - bool operator>=(const frame & lhs, const frame & rhs); + bool operator<(const frame & lhs, const frame & rhs); + bool operator>(const frame & lhs, const frame & rhs); + bool operator<=(const frame & lhs, const frame & rhs); + bool operator>=(const frame & lhs, const frame & rhs); bool operator==(const frame & lhs, const frame & rhs); - bool operator!=(const frame & lhs, const frame & rhs); + bool operator!=(const frame & lhs, const frame & rhs); // Hashing support, O(1) complexity; Async-Handler-Safe. - std::size_t hash_value(const frame & f); + std::size_t hash_value(const frame & f); // Outputs stacktrace::frame in a human readable format to output stream; unsafe to use in async handlers. template<typename CharT, typename TraitsT> std::basic_ostream< CharT, TraitsT > & - operator<<(std::basic_ostream< CharT, TraitsT > & os, const frame & f); + operator<<(std::basic_ostream< CharT, TraitsT > & os, const frame & f); } }
    +
    + +

    This header contains only forward declarations of boost::stacktrace::frame, boost::stacktrace::const_iterator, boost::stacktrace::basic_stacktrace and does not include any other headers.

    +
    @@ -99,7 +119,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/index.html b/index.html index c631c9b..1507205 100644 --- a/index.html +++ b/index.html @@ -56,6 +56,7 @@
    Header <boost/stacktrace/stacktrace.hpp>
    Header <boost/stacktrace/const_iterator.hpp>
    Header <boost/stacktrace/frame.hpp>
    +
    Header <boost/stacktrace/stacktrace_fwd.hpp>
    @@ -86,7 +87,7 @@
  • - +

    Last revised: December 01, 2016 at 06:55:37 GMT

    Last revised: December 08, 2016 at 07:02:44 GMT


    diff --git a/standalone_HTML.manifest b/standalone_HTML.manifest index 6fd9b82..61b7487 100644 --- a/standalone_HTML.manifest +++ b/standalone_HTML.manifest @@ -2,6 +2,7 @@ index.html boost_stacktrace/getting_started.html boost_stacktrace/build_macros_and_backends.html boost_stacktrace_header_reference.html -boost/stacktrace/stacktrace.html +boost/stacktrace/basic_stacktrace.html +BOOST_STACKTRACE_DEFAULT_MAX_DEPTH.html boost/stacktrace/const_iterator.html boost/stacktrace/frame.html