123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- #ifndef BOOST_STACKTRACE_DETAIL_FRAME_DECL_HPP
- #define BOOST_STACKTRACE_DETAIL_FRAME_DECL_HPP
- #include <boost/config.hpp>
- #ifdef BOOST_HAS_PRAGMA_ONCE
- # pragma once
- #endif
- #include <iosfwd>
- #include <string>
- #include <boost/stacktrace/safe_dump_to.hpp> // boost::stacktrace::detail::native_frame_ptr_t
- #include <boost/stacktrace/detail/void_ptr_cast.hpp>
- #include <boost/stacktrace/detail/push_options.h>
- namespace boost { namespace stacktrace {
- class frame {
- public:
- typedef boost::stacktrace::detail::native_frame_ptr_t native_frame_ptr_t;
- private:
-
- native_frame_ptr_t addr_;
-
- public:
-
-
-
-
-
-
-
-
- constexpr frame() noexcept
- : addr_(0)
- {}
- #ifdef BOOST_STACKTRACE_DOXYGEN_INVOKED
-
-
-
-
-
-
- constexpr frame(const frame&) = default;
-
-
-
-
-
-
- constexpr frame& operator=(const frame&) = default;
- #endif
-
-
-
-
-
-
- constexpr explicit frame(native_frame_ptr_t addr) noexcept
- : addr_(addr)
- {}
-
-
-
-
-
-
- template <class T>
- explicit frame(T* function_addr) noexcept
- : addr_(boost::stacktrace::detail::void_ptr_cast<native_frame_ptr_t>(function_addr))
- {}
-
-
-
-
-
-
- BOOST_STACKTRACE_FUNCTION std::string name() const;
-
-
-
-
-
-
- constexpr native_frame_ptr_t address() const noexcept {
- return addr_;
- }
-
-
-
-
-
-
-
- BOOST_STACKTRACE_FUNCTION std::string source_file() const;
-
-
-
-
-
-
- BOOST_STACKTRACE_FUNCTION std::size_t source_line() const;
-
-
-
-
-
-
- constexpr explicit operator bool () const noexcept { return !empty(); }
-
-
-
-
-
-
- constexpr bool empty() const noexcept { return !address(); }
- };
- namespace detail {
- BOOST_STACKTRACE_FUNCTION std::string to_string(const frame* frames, std::size_t size);
- }
- }}
- #include <boost/stacktrace/detail/pop_options.h>
- #endif
|