From 1c5274f9faee0320769b27795131dc41d6cfa67b Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 13 Jan 2017 22:33:37 +0300 Subject: [PATCH] Big refactoring: no more backends, only macro to enable additional functionality --- include/boost/stacktrace/const_iterator.hpp | 86 ------------------- include/boost/stacktrace/detail/backend.ipp | 25 ------ .../stacktrace/detail/backend_common.ipp | 49 ----------- .../{backend_msvc.hpp => frame_msvc.ipp} | 56 ++++++------ .../{backend_noop.hpp => frame_noop.ipp} | 27 +++--- .../{backend_unwind.hpp => frame_unwind.ipp} | 59 +++++++------ include/boost/stacktrace/frame.hpp | 30 ++++--- include/boost/stacktrace/stacktrace.hpp | 10 +-- include/boost/stacktrace/stacktrace_fwd.hpp | 13 +-- src/addr2line.cpp | 4 +- src/backtrace.cpp | 4 +- src/basic.cpp | 4 +- src/noop.cpp | 5 +- src/windbg.cpp | 5 +- test/Jamfile.v2 | 2 +- 15 files changed, 109 insertions(+), 270 deletions(-) delete mode 100644 include/boost/stacktrace/const_iterator.hpp delete mode 100644 include/boost/stacktrace/detail/backend.ipp delete mode 100644 include/boost/stacktrace/detail/backend_common.ipp rename include/boost/stacktrace/detail/{backend_msvc.hpp => frame_msvc.ipp} (94%) rename include/boost/stacktrace/detail/{backend_noop.hpp => frame_noop.ipp} (62%) rename include/boost/stacktrace/detail/{backend_unwind.hpp => frame_unwind.ipp} (80%) diff --git a/include/boost/stacktrace/const_iterator.hpp b/include/boost/stacktrace/const_iterator.hpp deleted file mode 100644 index f622bbc..0000000 --- a/include/boost/stacktrace/const_iterator.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright Antony Polukhin, 2016. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_STACKTRACE_CONST_ITERATOR_HPP -#define BOOST_STACKTRACE_CONST_ITERATOR_HPP - -#include -#ifdef BOOST_HAS_PRAGMA_ONCE -# pragma once -#endif - -#include -#include - -#include - -namespace boost { namespace stacktrace { - - -#ifdef BOOST_STACKTRACE_DOXYGEN_INVOKED -/// Random access iterator over frames that returns boost::stacktrace::frame on dereference -class const_iterator: implementation_details {}; - -#else - -// Forward declarations -template class basic_stacktrace; - -class const_iterator: public boost::iterator_facade< - const_iterator, - frame, - boost::random_access_traversal_tag, - frame> -{ - typedef boost::iterator_facade< - const_iterator, - frame, - boost::random_access_traversal_tag, - frame - > base_t; - - const boost::stacktrace::detail::backend* impl_; - std::size_t frame_no_; - - const_iterator(const boost::stacktrace::detail::backend* impl, std::size_t frame_no) BOOST_NOEXCEPT - : impl_(impl) - , frame_no_(frame_no) - {} - - template friend class basic_stacktrace; - friend class ::boost::iterators::iterator_core_access; - - frame dereference() const BOOST_NOEXCEPT { - return frame(impl_->get_address(frame_no_)); - } - - bool equal(const const_iterator& it) const BOOST_NOEXCEPT { - return impl_ == it.impl_ && frame_no_ == it.frame_no_; - } - - void increment() BOOST_NOEXCEPT { - ++frame_no_; - } - - void decrement() BOOST_NOEXCEPT { - --frame_no_; - } - - void advance(std::size_t n) BOOST_NOEXCEPT { - frame_no_ += n; - } - - base_t::difference_type distance_to(const const_iterator& it) const { - BOOST_ASSERT(impl_ == it.impl_); - return it.frame_no_ - frame_no_; - } -}; - -#endif // #ifdef BOOST_STACKTRACE_DOXYGEN_INVOKED - -}} // namespace boost::stacktrace - -#endif // BOOST_STACKTRACE_CONST_ITERATOR_HPP diff --git a/include/boost/stacktrace/detail/backend.ipp b/include/boost/stacktrace/detail/backend.ipp deleted file mode 100644 index e4521fa..0000000 --- a/include/boost/stacktrace/detail/backend.ipp +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright Antony Polukhin, 2016-2017. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_STACKTRACE_DETAIL_BACKEND_IPP -#define BOOST_STACKTRACE_DETAIL_BACKEND_IPP - -#include -#ifdef BOOST_HAS_PRAGMA_ONCE -# pragma once -#endif - -#include - -#if defined(BOOST_STACKTRACE_USE_NOOP) -# include -#elif defined(BOOST_MSVC) -# include -#else -# include -#endif - -#endif // BOOST_STACKTRACE_DETAIL_BACKEND_IPP diff --git a/include/boost/stacktrace/detail/backend_common.ipp b/include/boost/stacktrace/detail/backend_common.ipp deleted file mode 100644 index 0420df2..0000000 --- a/include/boost/stacktrace/detail/backend_common.ipp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright Antony Polukhin, 2016. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_STACKTRACE_DETAIL_BACKEND_COMMON_IPP -#define BOOST_STACKTRACE_DETAIL_BACKEND_COMMON_IPP - -#include -#ifdef BOOST_HAS_PRAGMA_ONCE -# pragma once -#endif - -#include - -namespace boost { namespace stacktrace { namespace detail { - -bool backend::operator< (const backend& rhs) const BOOST_NOEXCEPT { - if (frames_count_ != rhs.frames_count_) { - return frames_count_ < rhs.frames_count_; - } else if (hash_code_ != rhs.hash_code_) { - return hash_code_ < rhs.hash_code_; - } else if (data_ == rhs.data_) { - return false; - } - - return std::lexicographical_compare( - data_, data_ + frames_count_, - rhs.data_, rhs.data_ + rhs.frames_count_ - ); -} - -bool backend::operator==(const backend& rhs) const BOOST_NOEXCEPT { - if (hash_code_ != rhs.hash_code_ || frames_count_ != rhs.frames_count_) { - return false; - } else if (data_ == rhs.data_) { - return true; - } - - return std::equal( - data_, data_ + frames_count_, - rhs.data_ - ); -} - -}}} - -#endif // BOOST_STACKTRACE_DETAIL_BACKEND_COMMON_IPP diff --git a/include/boost/stacktrace/detail/backend_msvc.hpp b/include/boost/stacktrace/detail/frame_msvc.ipp similarity index 94% rename from include/boost/stacktrace/detail/backend_msvc.hpp rename to include/boost/stacktrace/detail/frame_msvc.ipp index 1c8c014..48ac6fe 100644 --- a/include/boost/stacktrace/detail/backend_msvc.hpp +++ b/include/boost/stacktrace/detail/frame_msvc.ipp @@ -4,14 +4,16 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_STACKTRACE_DETAIL_BACKEND_MSVC_HPP -#define BOOST_STACKTRACE_DETAIL_BACKEND_MSVC_HPP +#ifndef BOOST_STACKTRACE_DETAIL_FRAME_MSVC_IPP +#define BOOST_STACKTRACE_DETAIL_FRAME_MSVC_IPP #include #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif +#include + #include #include #include @@ -95,17 +97,6 @@ inline bool try_init_com(com_holder<::IDebugSymbols>& idebug, const com_global_i return true; } - -std::size_t backend::collect(void** memory, std::size_t size) BOOST_NOEXCEPT { - return ::CaptureStackBackTrace( - 0, - static_cast(size), - memory, - 0 - ); -} - - inline std::string get_name_impl(const com_holder& idebug, const void* addr, std::string* module_name = 0) { std::string result; const ULONG64 offset = reinterpret_cast(addr); @@ -222,19 +213,7 @@ inline void to_string_impl(const com_holder& idebug, const void* } } -std::string backend::to_string(const void* addr) { - boost::stacktrace::detail::com_global_initer com_guard; - boost::stacktrace::detail::com_holder idebug(com_guard); - if (!boost::stacktrace::detail::try_init_com(idebug, com_guard)) { - return std::string(); - } - - std::string res; - to_string_impl(idebug, addr, res); - return res; -} - -std::string backend::to_string(const frame* frames, std::size_t size) { +std::string to_string(const frame* frames, std::size_t size) { boost::stacktrace::detail::com_global_initer com_guard; boost::stacktrace::detail::com_holder idebug(com_guard); if (!boost::stacktrace::detail::try_init_com(idebug, com_guard)) { @@ -259,7 +238,6 @@ std::string backend::to_string(const frame* frames, std::size_t size) { } // namespace detail - std::string frame::name() const { boost::stacktrace::detail::com_global_initer com_guard; boost::stacktrace::detail::com_holder idebug(com_guard); @@ -301,6 +279,28 @@ std::size_t frame::source_line() const { return (is_ok ? line_num : 0); } +std::string to_string(const frame& f) { + boost::stacktrace::detail::com_global_initer com_guard; + boost::stacktrace::detail::com_holder idebug(com_guard); + if (!boost::stacktrace::detail::try_init_com(idebug, com_guard)) { + return std::string(); + } + + std::string res; + boost::stacktrace::detail::to_string_impl(idebug, f.address(), res); + return res; +} + + +std::size_t this_thread_frames::collect(void** memory, std::size_t size) BOOST_NOEXCEPT { + return ::CaptureStackBackTrace( + 0, + static_cast(size), + memory, + 0 + ); +} + }} // namespace boost::stacktrace -#endif // BOOST_STACKTRACE_DETAIL_BACKEND_MSVC_HPP +#endif // BOOST_STACKTRACE_DETAIL_FRAME_MSVC_IPP diff --git a/include/boost/stacktrace/detail/backend_noop.hpp b/include/boost/stacktrace/detail/frame_noop.ipp similarity index 62% rename from include/boost/stacktrace/detail/backend_noop.hpp rename to include/boost/stacktrace/detail/frame_noop.ipp index ea39f29..5edded5 100644 --- a/include/boost/stacktrace/detail/backend_noop.hpp +++ b/include/boost/stacktrace/detail/frame_noop.ipp @@ -4,26 +4,19 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_STACKTRACE_DETAIL_BACKEND_NOOP_HPP -#define BOOST_STACKTRACE_DETAIL_BACKEND_NOOP_HPP +#ifndef BOOST_STACKTRACE_DETAIL_FRAME_NOOP_IPP +#define BOOST_STACKTRACE_DETAIL_FRAME_NOOP_IPP #include #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif +#include + namespace boost { namespace stacktrace { namespace detail { - -std::size_t backend::collect(void** /*memory*/, std::size_t /*size*/) BOOST_NOEXCEPT { - return 0; -} - -std::string backend::to_string(const void* /*addr*/) { - return std::string(); -} - -std::string backend::to_string(const frame* /*frames*/, std::size_t /*count*/) { +std::string to_string(const frame* /*frames*/, std::size_t /*count*/) { return std::string(); } @@ -41,6 +34,14 @@ std::size_t frame::source_line() const { return 0; } +std::string to_string(const frame& /*f*/) { + return std::string(); +} + +std::size_t this_thread_frames::collect(void** /*memory*/, std::size_t /*size*/) BOOST_NOEXCEPT { + return 0; +} + }} // namespace boost::stacktrace -#endif // BOOST_STACKTRACE_DETAIL_BACKEND_LIBUNWIND_HPP +#endif // BOOST_STACKTRACE_DETAIL_FRAME_NOOP_IPP diff --git a/include/boost/stacktrace/detail/backend_unwind.hpp b/include/boost/stacktrace/detail/frame_unwind.ipp similarity index 80% rename from include/boost/stacktrace/detail/backend_unwind.hpp rename to include/boost/stacktrace/detail/frame_unwind.ipp index 30634dc..01f4508 100644 --- a/include/boost/stacktrace/detail/backend_unwind.hpp +++ b/include/boost/stacktrace/detail/frame_unwind.ipp @@ -1,17 +1,19 @@ -// Copyright Antony Polukhin, 2016. +// Copyright Antony Polukhin, 2016-2017. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_STACKTRACE_DETAIL_BACKEND_UNWIND_HPP -#define BOOST_STACKTRACE_DETAIL_BACKEND_UNWIND_HPP +#ifndef BOOST_STACKTRACE_DETAIL_FRAME_UNWIND_IPP +#define BOOST_STACKTRACE_DETAIL_FRAME_UNWIND_IPP #include #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif +#include + #include #include #include @@ -50,23 +52,6 @@ inline _Unwind_Reason_Code unwind_callback(::_Unwind_Context* context, void* arg return ::_URC_NO_REASON; } -std::size_t backend::collect(void** memory, std::size_t size) BOOST_NOEXCEPT { - std::size_t frames_count = 0; - if (!size) { - return frames_count; - } - - unwind_state state = { memory, memory + size }; - ::_Unwind_Backtrace(&unwind_callback, &state); - frames_count = state.current - memory; - - if (memory[frames_count - 1] == 0) { - -- frames_count; - } - - return frames_count; -} - template class to_string_impl_base: private Base { public: @@ -91,12 +76,7 @@ public: } }; -std::string backend::to_string(const void* addr) { - to_string_impl impl; - return impl(addr); -} - -std::string backend::to_string(const frame* frames, std::size_t size) { +std::string to_string(const frame* frames, std::size_t size) { std::string res; res.reserve(64 * size); @@ -116,9 +96,9 @@ std::string backend::to_string(const frame* frames, std::size_t size) { return res; } - } // namespace detail + std::string frame::name() const { ::Dl_info dli; const bool dl_ok = !!::dladdr(addr_, &dli); @@ -129,6 +109,29 @@ std::string frame::name() const { return boost::stacktrace::detail::name_impl(addr_); } +std::string to_string(const frame& f) { + boost::stacktrace::detail::to_string_impl impl; + return impl(f.address()); +} + + +std::size_t this_thread_frames::collect(void** memory, std::size_t size) BOOST_NOEXCEPT { + std::size_t frames_count = 0; + if (!size) { + return frames_count; + } + + boost::stacktrace::detail::unwind_state state = { memory, memory + size }; + ::_Unwind_Backtrace(&boost::stacktrace::detail::unwind_callback, &state); + frames_count = state.current - memory; + + if (memory[frames_count - 1] == 0) { + -- frames_count; + } + + return frames_count; +} + }} // namespace boost::stacktrace -#endif // BOOST_STACKTRACE_DETAIL_BACKEND_UNWIND_HPP +#endif // BOOST_STACKTRACE_DETAIL_FRAME_UNWIND_IPP diff --git a/include/boost/stacktrace/frame.hpp b/include/boost/stacktrace/frame.hpp index 3c2265d..b2d7d60 100644 --- a/include/boost/stacktrace/frame.hpp +++ b/include/boost/stacktrace/frame.hpp @@ -40,21 +40,13 @@ # define BOOST_STACKTRACE_FUNCTION inline #endif - namespace boost { namespace stacktrace { class frame; + namespace detail { - -// Class that implements the actual backtracing -class backend { -public: - BOOST_NOINLINE BOOST_STACKTRACE_FUNCTION static std::size_t collect(void** memory, std::size_t size) BOOST_NOEXCEPT; - BOOST_STACKTRACE_FUNCTION static std::string to_string(const void* addr); - BOOST_STACKTRACE_FUNCTION static std::string to_string(const frame* frames, std::size_t size); -}; - + BOOST_STACKTRACE_FUNCTION std::string to_string(const frame* frames, std::size_t size); } // namespace detail /// Non-owning class that references the frame information stored inside the boost::stacktrace::stacktrace class. @@ -165,19 +157,33 @@ inline std::size_t hash_value(const frame& f) BOOST_NOEXCEPT { return reinterpret_cast(f.address()); } +/// Outputs stacktrace::frame in a human readable format to string; unsafe to use in async handlers. +BOOST_STACKTRACE_FUNCTION std::string to_string(const frame& f); + /// Outputs stacktrace::frame in a human readable format to output stream; unsafe to use in async handlers. template std::basic_ostream& operator<<(std::basic_ostream& os, const frame& f) { - return os << boost::stacktrace::detail::backend::to_string(f.address()); + return os << boost::stacktrace::to_string(f); } +struct this_thread_frames { + BOOST_NOINLINE BOOST_STACKTRACE_FUNCTION static std::size_t collect(void** memory, std::size_t size) BOOST_NOEXCEPT; +}; + }} // namespace boost::stacktrace /// @cond + #undef BOOST_STACKTRACE_FUNCTION #ifndef BOOST_STACKTRACE_LINK -# include +# if defined(BOOST_STACKTRACE_USE_NOOP) +# include +# elif defined(BOOST_MSVC) +# include +# else +# include +# endif #endif /// @endcond diff --git a/include/boost/stacktrace/stacktrace.hpp b/include/boost/stacktrace/stacktrace.hpp index 139f172..f7ea2af 100644 --- a/include/boost/stacktrace/stacktrace.hpp +++ b/include/boost/stacktrace/stacktrace.hpp @@ -67,7 +67,7 @@ public: /// @brief Stores the current function call sequence inside the class. /// - /// @b Complexity: O(N) where N is call sequence length, O(1) for noop backend. + /// @b Complexity: O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined. /// /// @b Async-Handler-Safety: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe. /// @@ -90,7 +90,7 @@ public: try { { // Fast path without additional allocations void* buffer[buffer_size]; - const std::size_t frames_count = boost::stacktrace::detail::backend::collect(buffer, buffer_size); + const std::size_t frames_count = boost::stacktrace::this_thread_frames::collect(buffer, buffer_size); if (buffer_size > frames_count || frames_count >= max_depth) { const std::size_t size = (max_depth < frames_count ? max_depth : frames_count); fill(buffer, size); @@ -102,7 +102,7 @@ public: typedef typename Allocator::template rebind::other allocator_void_t; boost::container::vector buf(buffer_size * 2, 0, impl_.get_allocator()); do { - const std::size_t frames_count = boost::stacktrace::detail::backend::collect(buf.data(), buf.size()); + const std::size_t frames_count = boost::stacktrace::this_thread_frames::collect(buf.data(), buf.size()); if (buf.size() > frames_count || frames_count >= max_depth) { const std::size_t size = (max_depth < frames_count ? max_depth : frames_count); fill(buf.data(), size); @@ -164,7 +164,7 @@ public: /// index close to this->size() contains function `main()`. /// @returns frame that references the actual frame info, stored inside *this. /// - /// @b Complexity: Amortized O(1), O(1) for noop backend. + /// @b Complexity: Amortized O(1), O(1) if BOOST_STACKTRACE_USE_NOOP is defined. /// /// @b Async-Handler-Safety: Safe. const_reference operator[](std::size_t frame_no) const BOOST_NOEXCEPT { @@ -283,7 +283,7 @@ std::size_t hash_value(const basic_stacktrace& st) BOOST_NOEXCEPT { /// Outputs stacktrace in a human readable format to output stream; unsafe to use in async handlers. template std::basic_ostream& operator<<(std::basic_ostream& os, const basic_stacktrace& bt) { - return os << boost::stacktrace::detail::backend::to_string(bt.as_vector().data(), bt.size()); + return os << boost::stacktrace::detail::to_string(bt.as_vector().data(), bt.size()); } typedef basic_stacktrace<> stacktrace; diff --git a/include/boost/stacktrace/stacktrace_fwd.hpp b/include/boost/stacktrace/stacktrace_fwd.hpp index 6dbddea..d8e666d 100644 --- a/include/boost/stacktrace/stacktrace_fwd.hpp +++ b/include/boost/stacktrace/stacktrace_fwd.hpp @@ -1,4 +1,4 @@ -// Copyright Antony Polukhin, 2016. +// Copyright Antony Polukhin, 2016-2017. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -11,18 +11,9 @@ #include /// @file stacktrace_fwd.hpp This header contains only forward declarations of -/// boost::stacktrace::frame, boost::stacktrace::const_iterator, boost::stacktrace::basic_stacktrace +/// boost::stacktrace::frame, boost::stacktrace::basic_stacktrace /// and does not include any other Boost headers. - -#ifndef BOOST_STACKTRACE_DEFAULT_MAX_DEPTH -/// 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. -/// -/// @b Default: 100 -#define BOOST_STACKTRACE_DEFAULT_MAX_DEPTH 100 -#endif - namespace boost { namespace stacktrace { class frame; diff --git a/src/addr2line.cpp b/src/addr2line.cpp index 0bdd4dd..7360d41 100644 --- a/src/addr2line.cpp +++ b/src/addr2line.cpp @@ -1,4 +1,4 @@ -// Copyright Antony Polukhin, 2016. +// Copyright Antony Polukhin, 2016-2017. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -7,4 +7,4 @@ #define BOOST_STACKTRACE_INTERNAL_BUILD_LIBS #define BOOST_STACKTRACE_USE_ADDR2LINE #define BOOST_STACKTRACE_LINK -#include +#include diff --git a/src/backtrace.cpp b/src/backtrace.cpp index 4b6e018..b9e9dc8 100644 --- a/src/backtrace.cpp +++ b/src/backtrace.cpp @@ -1,4 +1,4 @@ -// Copyright Antony Polukhin, 2016. +// Copyright Antony Polukhin, 2016-2017. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -7,4 +7,4 @@ #define BOOST_STACKTRACE_INTERNAL_BUILD_LIBS #define BOOST_STACKTRACE_USE_BACKTRACE #define BOOST_STACKTRACE_LINK -#include +#include diff --git a/src/basic.cpp b/src/basic.cpp index cfe6ff2..4d6d928 100644 --- a/src/basic.cpp +++ b/src/basic.cpp @@ -1,4 +1,4 @@ -// Copyright Antony Polukhin, 2016. +// Copyright Antony Polukhin, 2016-2017. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -6,4 +6,4 @@ #define BOOST_STACKTRACE_INTERNAL_BUILD_LIBS #define BOOST_STACKTRACE_LINK -#include +#include diff --git a/src/noop.cpp b/src/noop.cpp index 7be3af4..232d2a4 100644 --- a/src/noop.cpp +++ b/src/noop.cpp @@ -1,10 +1,9 @@ -// Copyright Antony Polukhin, 2016. +// Copyright Antony Polukhin, 2016-2017. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #define BOOST_STACKTRACE_INTERNAL_BUILD_LIBS -#define BOOST_STACKTRACE_USE_NOOP #define BOOST_STACKTRACE_LINK -#include +#include diff --git a/src/windbg.cpp b/src/windbg.cpp index 304569c..a6be578 100644 --- a/src/windbg.cpp +++ b/src/windbg.cpp @@ -1,10 +1,9 @@ -// Copyright Antony Polukhin, 2016. +// Copyright Antony Polukhin, 2016-2017. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #define BOOST_STACKTRACE_INTERNAL_BUILD_LIBS -#define BOOST_STACKTRACE_USE_WINDBG #define BOOST_STACKTRACE_LINK -#include +#include diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3f8a30a..de43399 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -62,7 +62,7 @@ test-suite stacktrace_tests [ run test.cpp test_impl.cpp : : : $(WIND_DEPS) : windbg_ho ] [ run test.cpp test_impl.cpp : : : $(BASIC_DEPS) : basic_ho ] - # Test with shared linked backends + # Test with shared linked implementations [ run test.cpp : : : .//test_impl_lib_backtrace $(LINKSHARED_BT) : backtrace_lib ] [ run test.cpp : : : .//test_impl_lib_addr2line $(LINKSHARED_UNWD) : addr2line_lib ] [ run test.cpp : : : .//test_impl_lib_windbg $(LINKSHARED_WIND) : windbg_lib ]