MCPcopy Create free account
hub / github.com/boostorg/stacktrace / frame

Class frame

include/boost/stacktrace/detail/frame_decl.hpp:30–141  ·  view source on GitHub ↗

@class boost::stacktrace::frame boost/stacktrace/detail/frame_decl.hpp @brief Class that stores frame/function address and can get information about it at runtime.

Source from the content-addressed store, hash-verified

28/// @class boost::stacktrace::frame boost/stacktrace/detail/frame_decl.hpp <boost/stacktrace/frame.hpp>
29/// @brief Class that stores frame/function address and can get information about it at runtime.
30class frame {
31public:
32 typedef boost::stacktrace::detail::native_frame_ptr_t native_frame_ptr_t;
33
34private:
35 /// @cond
36 native_frame_ptr_t addr_;
37 /// @endcond
38
39public:
40 /// @brief Constructs frame that references NULL address.
41 /// Calls to source_file() and source_line() will return empty string.
42 /// Calls to source_line() will return 0.
43 ///
44 /// @b Complexity: O(1).
45 ///
46 /// @b Async-Handler-Safety: Safe.
47 /// @throws Nothing.
48 constexpr frame() noexcept
49 : addr_(0)
50 {}
51
52#ifdef BOOST_STACKTRACE_DOXYGEN_INVOKED
53 /// @brief Copy constructs frame.
54 ///
55 /// @b Complexity: O(1).
56 ///
57 /// @b Async-Handler-Safety: Safe.
58 /// @throws Nothing.
59 constexpr frame(const frame&) = default;
60
61 /// @brief Copy assigns frame.
62 ///
63 /// @b Complexity: O(1).
64 ///
65 /// @b Async-Handler-Safety: Safe.
66 /// @throws Nothing.
67 constexpr frame& operator=(const frame&) = default;
68#endif
69
70 /// @brief Constructs frame that references addr and could later generate information about that address using platform specific features.
71 ///
72 /// @b Complexity: O(1).
73 ///
74 /// @b Async-Handler-Safety: Safe.
75 /// @throws Nothing.
76 constexpr explicit frame(native_frame_ptr_t addr) noexcept
77 : addr_(addr)
78 {}
79
80 /// @brief Constructs frame that references function_addr and could later generate information about that function using platform specific features.
81 ///
82 /// @b Complexity: O(1).
83 ///
84 /// @b Async-Handler-Safety: Safe.
85 /// @throws Nothing.
86 template <class T>
87 explicit frame(T* function_addr) noexcept

Callers 2

prepare_function_nameMethod · 0.70
prepare_function_nameMethod · 0.70

Calls 4

nameFunction · 0.85
source_fileFunction · 0.85
source_lineFunction · 0.85
emptyFunction · 0.85

Tested by

no test coverage detected