# Reference

Allocator to use during stack capture.

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

std::vector< `boost::stacktrace::frame`, Allocator >::value_type
std::vector< `boost::stacktrace::frame`, Allocator >::allocator_type
std::vector< `boost::stacktrace::frame`, Allocator >::const_pointer
std::vector< `boost::stacktrace::frame`, Allocator >::const_pointer
std::vector< `boost::stacktrace::frame`, Allocator >::const_reference
std::vector< `boost::stacktrace::frame`, Allocator >::const_reference
std::vector< `boost::stacktrace::frame`, Allocator >::size_type
std::vector< `boost::stacktrace::frame`, Allocator >::difference_type
std::vector< `boost::stacktrace::frame`, Allocator >::const_iterator
std::vector< `boost::stacktrace::frame`, Allocator >::const_iterator
std::vector< `boost::stacktrace::frame`, Allocator >::const_reverse_iterator
std::vector< `boost::stacktrace::frame`, Allocator >::const_reverse_iterator
size_type

Complexity: O(1)

Async-Handler-Safety: Safe.

Number of function names stored inside the class.

const_reference `std::size_t

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()`.

`

Complexity: O(1).

Async-Handler-Safety: Safe.

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

const_iterator

Complexity: O(1)

Async-Handler-Safety: Safe.

const_iterator

Complexity: O(1)

Async-Handler-Safety: Safe.

const_iterator

Complexity: O(1)

Async-Handler-Safety: Safe.

const_iterator

Complexity: O(1)

Async-Handler-Safety: Safe.

const_reverse_iterator

Complexity: O(1)

Async-Handler-Safety: Safe.

const_reverse_iterator

Complexity: O(1)

Async-Handler-Safety: Safe.

const_reverse_iterator

Complexity: O(1)

Async-Handler-Safety: Safe.

const_reverse_iterator

Complexity: O(1)

Async-Handler-Safety: Safe.

bool Allows to check that stack trace capturing was successful.

Complexity: O(1)

Async-Handler-Safety: Safe.

`true` if `this->size() != 0`

bool Allows to check that stack trace failed.

Complexity: O(1)

Async-Handler-Safety: Safe.

`true` if `this->size() == 0`

const std::vector< `boost::stacktrace::frame`, Allocator > &
Stores the current function call sequence inside *this without any decoding or any other heavy platform specific operations.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe.

const allocator_type &

Allocator that would be passed to underlying storeage.

Stores the current function call sequence inside *this without any decoding or any other heavy platform specific operations.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe.

std::size_t

How many top calls to skip and do not store in *this.

std::size_t

Max call sequence depth to collect.

const allocator_type &
allocator_type()

Allocator that would be passed to underlying storeage.

Stores [skip, skip + max_depth) of the current function call sequence inside *this without any decoding or any other heavy platform specific operations.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe.

`Nothing.` Note that default construction of allocator may throw, however it is performed outside the constructor and exception in `allocator_type()` would not result in calling `std::terminate`.

const `basic_stacktrace` &

Complexity: O(st.size())

Async-Handler-Safety: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe.

`basic_stacktrace` & `const `basic_stacktrace` &`

Complexity: O(st.size())

Async-Handler-Safety: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe.

Complexity: O(1)

Async-Handler-Safety: Safe if Allocator::deallocate is async signal safe.

basic_stacktrace
&&

Complexity: O(1)

Async-Handler-Safety: Safe if Allocator construction and copying are async signal safe.

`basic_stacktrace` & ``basic_stacktrace` &&`

Complexity: O(st.size())

Async-Handler-Safety: Safe if Allocator construction and copying are async signal safe.

`basic_stacktrace` `std::basic_istream< Char, Trait > &` `const allocator_type &allocator_type()`

Constructs stacktrace from basic_istreamable that references the dumped stacktrace. Terminating zero frame is discarded.

Complexity: O(N)

`basic_stacktrace` `const void *

Begining of the memory where the stacktrace was saved using the boost::stacktrace::safe_dump_to

` `std::size_t

Size of the memory. Usually the same value that was passed to the boost::stacktrace::safe_dump_to

` `const allocator_type &allocator_type()`

Constructs stacktrace from raw memory dump. Terminating zero frame is discarded.

Complexity: O(size) in worst case

This is the typedef to use unless you'd like to provide a specific allocator to `boost::stacktrace::basic_stacktrace`.
`basic_stacktrace`
bool `const `basic_stacktrace`< Allocator1 > &` `const `basic_stacktrace`< Allocator2 > &` Compares stacktraces for less, order is platform dependent.

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

Async-Handler-Safety: Safe.

bool `const `basic_stacktrace`< Allocator1 > &` `const `basic_stacktrace`< Allocator2 > &` Compares stacktraces for equality.

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

Async-Handler-Safety: Safe.

bool `const `basic_stacktrace`< Allocator1 > &` `const `basic_stacktrace`< Allocator2 > &` Comparison operators that provide platform dependant ordering and have amortized O(1) complexity; O(size()) worst case complexity; are Async-Handler-Safe.
bool `const `basic_stacktrace`< Allocator1 > &` `const `basic_stacktrace`< Allocator2 > &`
bool `const `basic_stacktrace`< Allocator1 > &` `const `basic_stacktrace`< Allocator2 > &`
bool `const `basic_stacktrace`< Allocator1 > &` `const `basic_stacktrace`< Allocator2 > &`
std::size_t `const `basic_stacktrace`< Allocator > &` Fast hashing support, O(st.size()) complexity; Async-Handler-Safe.
std::string `const `basic_stacktrace`< Allocator > &` Returns std::string with the stacktrace in a human readable format; unsafe to use in async handlers.
std::basic_ostream< CharT, TraitsT > & `std::basic_ostream< CharT, TraitsT > &` `const `basic_stacktrace`< Allocator > &` Outputs stacktrace in a human readable format to the output stream `os`; unsafe to use in async handlers.

Use <boost/stacktrace/frame.hpp> header instead of this one!

Class that stores frame/function address and can get information about it at runtime.
unspecified
std::string

Complexity: unknown (lots of platform specific work).

Async-Handler-Safety: Unsafe.

Name of the frame (function name in a human readable form).

`std::bad_alloc` if not enough memory to construct resulting string.

constexpr native_frame_ptr_t

Complexity: O(1).

Async-Handler-Safety: Safe.

Address of the frame function.

`Nothing.`

std::string

Complexity: unknown (lots of platform specific work).

Async-Handler-Safety: Unsafe.

Path to the source file, were the function of the frame is defined. Returns empty string if this->source_line() == 0.

`std::bad_alloc` if not enough memory to construct resulting string.

std::size_t

Complexity: unknown (lots of platform specific work).

Async-Handler-Safety: Unsafe.

Code line in the source file, were the function of the frame is defined.

`std::bad_alloc` if not enough memory to construct string for internal needs.

constexpr bool Checks that frame is not references NULL address.

Complexity: O(1)

Async-Handler-Safety: Safe. Checks that frame references NULL address. Complexity: O(1)

Async-Handler-Safety: Safe.

`true` if `this->address() != 0`

`true` if `this->address() == 0`

Constructs frame that references NULL address. Calls to source_file() and source_line() will return empty string. Calls to source_line() will return 0.

Complexity: O(1).

Async-Handler-Safety: Safe.

`Nothing.`

const `frame` &
Copy constructs frame.

Complexity: O(1).

Async-Handler-Safety: Safe.

`Nothing.`

constexpr `frame` & `const `frame` &` Copy assigns frame.

Complexity: O(1).

Async-Handler-Safety: Safe.

`Nothing.`

native_frame_ptr_t
Constructs frame that references addr and could later generate information about that address using platform specific features.

Complexity: O(1).

Async-Handler-Safety: Safe.

`Nothing.`

T *
Constructs frame that references function_addr and could later generate information about that function using platform specific features.

Complexity: O(1).

Async-Handler-Safety: Safe.

`Nothing.`

constexpr bool `const `frame` &` `const `frame` &` Comparison operators that provide platform dependant ordering and have O(1) complexity; are Async-Handler-Safe.
constexpr bool `const `frame` &` `const `frame` &`
constexpr bool `const `frame` &` `const `frame` &`
constexpr bool `const `frame` &` `const `frame` &`
constexpr bool `const `frame` &` `const `frame` &`
constexpr bool `const `frame` &` `const `frame` &`
std::size_t `const `frame` &` Fast hashing support, O(1) complexity; Async-Handler-Safe.
std::string `const `frame` &` Outputs `stacktrace::frame` in a human readable format to string; unsafe to use in async handlers.
std::basic_ostream< CharT, TraitsT > & `std::basic_ostream< CharT, TraitsT > &` `const `frame` &` Outputs `stacktrace::frame` in a human readable format to output stream; unsafe to use in async handlers.

This header contains low-level async-signal-safe functions for dumping call stacks. Dumps are binary serialized arrays of `void*`, so you could read them by using 'od -tx8 -An stacktrace_dump_failename' Linux command or using boost::stacktrace::stacktrace::from_dump functions.

std::size_t `void *

Preallocated buffer to store current function call sequence into.

` `std::size_t

Size of the preallocated buffer.

` Stores current function call sequence into the memory.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe.

Stored call sequence depth including terminating zero frame. To get the actually consumed bytes multiply this value by the sizeof(boost::stacktrace::frame::native_frame_ptr_t)

std::size_t `std::size_t

How many top calls to skip and do not store.

` `void *

Preallocated buffer to store current function call sequence into.

` `std::size_t

Size of the preallocated buffer.

` Stores current function call sequence into the memory.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe.

Stored call sequence depth including terminating zero frame. To get the actually consumed bytes multiply this value by the sizeof(boost::stacktrace::frame::native_frame_ptr_t)

std::size_t `const char *

File to store current function call sequence.

` Opens a file and rewrites its content with current function call sequence if such operations are async signal safe.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe.

Stored call sequence depth including terminating zero frame.

std::size_t `std::size_t

How many top calls to skip and do not store.

` `std::size_t

Max call sequence depth to collect.

` `const char *

File to store current function call sequence.

` Opens a file and rewrites its content with current function call sequence if such operations are async signal safe.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe.

Stored call sequence depth including terminating zero frame.

std::size_t `platform_specific_descriptor` Writes into the provided file descriptor the current function call sequence if such operation is async signal safe.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe.

Stored call sequence depth including terminating zero frame.

std::size_t `std::size_t

How many top calls to skip and do not store.

` `std::size_t

Max call sequence depth to collect.

` `platform_specific_descriptor` Writes into the provided file descriptor the current function call sequence if such operation is async signal safe.

Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.

Async-Handler-Safety: Safe.

Stored call sequence depth including terminating zero frame.

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