From a8da47b808ec31faf478ac7efc4c0708857a13af Mon Sep 17 00:00:00 2001
From: Antony Polukhin boost::stacktrace::const_iterator — Random access iterator over frames that returns boost::stacktrace::const_iterator — Random access iterator over frames that returns boost::stacktrace::frame on dereference.
+ Complexity: O(1). Async-Handler-Safety: Safe.
Throws:
+ Complexity: O(1). Async-Handler-Safety: Safe.
Throws:
+ Complexity: O(1). Async-Handler-Safety: Safe.
Throws:
-
+Async-Handler-Safety: Unsafe.
Returns: Name of the frame (function name in a human readable form). Name of the frame (function name in a human readable form). Throws:
-
+Async-Handler-Safety: Safe.
Returns: Address of the frame function. Address of the frame function. Throws:
- Throws:
- Throws: Complexity: O(N) where N is call seaquence length, O(1) for noop backend. 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. Complexity: O(st.size()) Async-Handler-Safety: Safe. Complexity: O(st.size()) Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe.
-Complexity: O(1) Async-Handler-Safety: Safe.
-Complexity: Amortized O(1), O(1) for noop backend. Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe. Complexity: O(1) Async-Handler-Safety: Safe.
-Complexity: O(1)
+Complexity: O(1) Async-Handler-Safety: Safe. Complexity: Amortized O(1); worst case O(size()) Complexity: Amortized O(1); worst case O(size()) Async-Handler-Safety: Safe. Complexity: Amortized O(1); worst case O(size()) Complexity: Amortized O(1); worst case O(size()) Async-Handler-Safety: Safe. Complexity: O(1) Complexity: O(1) Async-Handler-Safety: Safe.
- Construction speed
-
Async signal safe[c]
@@ -89,13 +83,14 @@
- BOOST_STACKTRACE_USE_LIBUNWIND
+ BOOST_STACKTRACE_USE_UNWIND
- Use libunwind tracing backend. This is the best known backend for
- POSIX systems that requires linking with libunwind library.
+ Use unwind tracing backend. This is the best known backend for POSIX
+ systems that requires LSB Core Specification 4.1 from OS. Requires
+ linking with libdl library.
- slow
-
- no
+ Constructors
- fast
-
- no
+ ???
- Use tracing backend that calls POSIX function backtrace. This is
- a fallback backend for POSIX platforms that requires linking with
- libdl library.
+ Use tracing backend that calls POSIX function
- fast
-
no
@@ -232,17 +211,12 @@
- noop
-
- yes
+ all functions
[a]
This will provide more readable backtraces if the binary is built
with debug information.
@@ -252,7 +226,8 @@
that are exported by the binary.
[c]
- Absolutely safe to use that backend in async signal handler.
+ Absolutely safe to construct instances of Class const_iterator
-frame on dereference. Synopsis
// In header: <boost/stacktrace/const_iterator.hpp>
-class const_iterator : public boost::iterator_facade< const_iterator, frame, boost::random_access_traversal_tag, frame >
-{
+class const_iterator : private implementation_details {
};
@@ -317,7 +292,7 @@
diff --git a/boost/stacktrace/frame.html b/boost/stacktrace/frame.html
index 60d329c..10097d2 100644
--- a/boost/stacktrace/frame.html
+++ b/boost/stacktrace/frame.html
@@ -34,76 +34,79 @@
class frame {
public:
// construct/copy/destruct
- frame() = delete;
- frame(const frame &) = default;
- explicit frame(const void *) noexcept;
- frame & operator=(const frame &) = default;
+ frame() = delete;
+ 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;
+ // public member functions
+ std::string name() const;
+ const void * address() const noexcept;
+ std::string source_file() const;
+ std::size_t source_line() const;
};
Description
+Description
+
frame
public
construct/copy/destruct
-
frame() = delete;
frame() = delete;
frame(const frame &) = default;
Copy constructs frame. frame(const frame &) = default;
Copy constructs frame.
-Nothing. Complexity: O(1).
+Nothing.
explicit frame(const void * addr) noexcept;
Constructs frame that can extract information from addr at runtime. explicit frame(const void * addr) noexcept;
Constructs frame that can extract information from addr at runtime.
-Nothing. Complexity: O(1).
+Nothing.
frame & operator=(const frame &) = default;
Copy assigns frame. frame & operator=(const frame &) = default;
Copy assigns frame.
-Nothing. Complexity: O(1).
+Nothing.
-
+frame public member functions
+
frame public member functions
std::string name() const;
+std::string name() const;
-
+
@@ -113,16 +116,16 @@
const void * address() const noexcept;
+const void * address() const noexcept;
-
+
@@ -132,10 +135,10 @@
std::string source_file() const;
+std::string source_file() const;
-std::bad_alloc if not enough memory to construct resulting string.
+std::bad_alloc if not enough memory to construct resulting string.
std::size_t source_line() const;
+std::size_t source_line() const;
-std::bad_alloc if not enough memory to construct string for internal needs.
+std::bad_alloc if not enough memory to construct string for internal needs.
Description
+Description
+
stacktrace
public
construct/copy/destruct
stacktrace() noexcept;
Stores the current function call sequence inside the class. stacktrace() noexcept;
Stores the current function call sequence inside the class. stacktrace(const stacktrace & st) noexcept;
-Complexity: O(1) stacktrace(const stacktrace & st) noexcept;
+stacktrace & operator=(const stacktrace & st) noexcept;
-Complexity: O(1) stacktrace & operator=(const stacktrace & st) noexcept;
+~stacktrace();
-Complexity: O(N) for libunwind, O(1) for other backends. ~stacktrace();
+
-
+stacktrace public member functions
+
stacktrace public member functions
std::size_t size() const noexcept;
+std::size_t size() const noexcept;
@@ -102,10 +110,11 @@
frame operator[](std::size_t frame_no) const noexcept;
+frame operator[](std::size_t frame_no) const noexcept;
const_iterator begin() const noexcept;
-Complexity: O(1) const_iterator begin() const noexcept;
+const_iterator cbegin() const noexcept;
-Complexity: O(1) const_iterator cbegin() const noexcept;
+const_iterator end() const noexcept;
-Complexity: O(1) const_iterator end() const noexcept;
+const_iterator cend() const noexcept;
-Complexity: O(1) const_iterator cend() const noexcept;
+const_reverse_iterator rbegin() const noexcept;
-Complexity: O(1) const_reverse_iterator rbegin() const noexcept;
+const_reverse_iterator crbegin() const noexcept;
-Complexity: O(1) const_reverse_iterator crbegin() const noexcept;
+const_reverse_iterator rend() const noexcept;
-Complexity: O(1) const_reverse_iterator rend() const noexcept;
+const_reverse_iterator crend() const noexcept;
-Complexity: O(1) const_reverse_iterator crend() const noexcept;
+explicit operator bool() const noexcept;
Allows to check that stack trace capturing was successful. explicit operator bool() const noexcept;
Allows to check that stack trace capturing was successful.
@@ -162,13 +188,16 @@
bool operator<(const stacktrace & rhs) const noexcept;
Compares stacktraces for less, order is platform dependant. bool operator<(const stacktrace & rhs) const noexcept;
Compares stacktraces for less, order is platform dependant. bool operator==(const stacktrace & rhs) const noexcept;
Compares stacktraces for equality. bool operator==(const stacktrace & rhs) const noexcept;
Compares stacktraces for equality. std::size_t hash_code() const noexcept;
Returns hashed code of the stacktrace. std::size_t hash_code() const noexcept;
Returns hashed code of the stacktrace.
@@ -74,11 +73,6 @@
Uses dynamic exports information [b]
-
-
@@ -154,12 +144,7 @@
@@ -115,12 +110,7 @@
-
-
-
-
@@ -171,9 +156,8 @@
backtrace.
+ Requires linking with libdl library.
@@ -191,11 +175,6 @@
yes
-
-
-
-
-
+
boost::stacktrace::stacktrace
+ in async signal handlers using that backend.
[1] Strictly speaking this code is not async-signal-safe, but we have SIGSEGV already it could hardly become worse. Section "Build, Macros and Backends" describes async-signal-safe backends, so if you will use the noop backend code becomes absolutely valid as that backens always returns 0 frames and operator<< will be never called.
[1] Strictly speaking this code is not async-signal-safe, because it uses std::cerr. Section "Build, Macros and Backends" describes async-signal-safe backends, so if you will use the noop backend code becomes absolutely valid as that backens always returns 0 frames and operator<< will be never called.
Last revised: November 26, 2016 at 20:24:41 GMT |
+Last revised: November 30, 2016 at 07:48:20 GMT |