From e5940e7103ef50319575690f5a5baf27362829fb Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Thu, 1 Sep 2022 17:51:22 +0300 Subject: [PATCH] remove COM-initialization related tests and notes in docs --- doc/stacktrace.qbk | 4 ++-- test/Jamfile.v2 | 26 -------------------------- test/thread_safety_checking.cpp | 15 --------------- 3 files changed, 2 insertions(+), 43 deletions(-) diff --git a/doc/stacktrace.qbk b/doc/stacktrace.qbk index ecf4d22..d7cb5db 100644 --- a/doc/stacktrace.qbk +++ b/doc/stacktrace.qbk @@ -286,9 +286,9 @@ By default Boost.Stacktrace is a header-only library, but you may change that an In header only mode library could be tuned by macro. If one of the link macro from above is defined, you have to manually link with one of the libraries: [table:libconfig Config [[Macro name or default] [Library] [Effect] [Platforms] [Uses debug information [footnote This will provide more readable backtraces with *source code locations* if the binary is built with debug information.]] [Uses dynamic exports information [footnote This will provide readable function names in backtrace for functions that are exported by the binary. Compiling with `-rdynamic` flag, without `-fisibility=hidden` or marking functions as exported produce a better stacktraces.]] ] - [[['default for MSVC, Intel on Windows, MinGW-w64] / *BOOST_STACKTRACE_USE_WINDBG*] [*boost_stacktrace_windbg*] [ Uses COM to show debug info. May require linking with *ole32* and *dbgeng*. ] [MSVC, MinGW-w64, Intel on Windows] [yes] [no]] + [[['default for MSVC, Intel on Windows, MinGW-w64] / *BOOST_STACKTRACE_USE_WINDBG*] [*boost_stacktrace_windbg*] [ Uses `dbgeng.h` to show debug info. May require linking with *ole32* and *dbgeng*. ] [MSVC, MinGW-w64, Intel on Windows] [yes] [no]] [[['default for other platforms]] [*boost_stacktrace_basic*] [Uses compiler intrinsics to collect stacktrace and if possible `::dladdr` to show information about the symbol. Requires linking with *libdl* library on POSIX platforms.] [Any compiler on POSIX or MinGW] [no] [yes]] - [[*BOOST_STACKTRACE_USE_WINDBG_CACHED*] [*boost_stacktrace_windbg_cached*] [ Uses COM to show debug info and caches COM instances in TLS for better performance. Useful only for cases when traces are gathered very often. [footnote This may affect other components of your program that use COM, because this mode calls the `CoInitializeEx(0, COINIT_MULTITHREADED)` on first use and does not call `::CoUninitialize();` until the current thread is destroyed. ] May require linking with *ole32* and *dbgeng*. ] [MSVC, Intel on Windows] [yes] [no]] + [[*BOOST_STACKTRACE_USE_WINDBG_CACHED*] [*boost_stacktrace_windbg_cached*] [ Uses `dbgeng.h` to show debug info and caches internals in TLS for better performance. Useful only for cases when traces are gathered very often. May require linking with *ole32* and *dbgeng*. ] [MSVC, Intel on Windows] [yes] [no]] [[*BOOST_STACKTRACE_USE_BACKTRACE*] [*boost_stacktrace_backtrace*] [Requires linking with *libdl* on POSIX and *libbacktrace* libraries. *libbacktrace* is probably already installed in your system[footnote If you are using Clang with libstdc++ you could get into troubles of including ``, because on some platforms Clang does not search for headers in the GCC's include paths and any attempt to add GCC's include path leads to linker errors. To explicitly specify a path to the `` header you could define the *BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE* to a full path to the header. For example on Ubuntu Xenial use the command line option *-DBOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE=* while building with Clang. ], or built into your compiler. Otherwise (if you are a *MinGW*/*MinGW-w64* user for example) it can be downloaded [@https://github.com/ianlancetaylor/libbacktrace from here] or [@https://github.com/gcc-mirror/gcc/tree/master/libbacktrace from here]. ] [Any compiler on POSIX, or MinGW, or MinGW-w64] [yes] [yes]] diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 5bfd8d1..eda4bd1 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -110,15 +110,6 @@ test-suite stacktrace_tests : : : on /boost/thread//boost_thread /boost/timer//boost_timer .//test_impl_lib_basic $(LINKSHARED_BASIC) : basic_lib_threaded ] - [ run thread_safety_checking.cpp - : : : on /boost/thread//boost_thread /boost/timer//boost_timer .//test_impl_lib_windbg - $(LINKSHARED_WIND) BOOST_STACKTRACE_TEST_COM_PREINIT_MT - : windbg_lib_threaded_com_mt ] - [ run thread_safety_checking.cpp - : : : on /boost/thread//boost_thread /boost/timer//boost_timer .//test_impl_lib_windbg_cached - $(LINKSHARED_WIND_CACHED) BOOST_STACKTRACE_TEST_COM_PREINIT_ST - : windbg_cached_lib_threaded_com_st ] - ##### Tests with disabled debug symbols ##### # Header only tests without debug symbols @@ -170,23 +161,6 @@ test-suite stacktrace_tests $(LINKSHARED_BASIC) : basic_lib_no_dbg_threaded ] - [ run thread_safety_checking.cpp - : : : off - /boost/thread//boost_thread - /boost/timer//boost_timer - .//test_impl_lib_windbg - $(LINKSHARED_WIND) - BOOST_STACKTRACE_TEST_COM_PREINIT_MT - : windbg_lib_threaded_com_mt ] - [ run thread_safety_checking.cpp - : : : off - /boost/thread//boost_thread - /boost/timer//boost_timer - .//test_impl_lib_windbg_cached - $(LINKSHARED_WIND_CACHED) - BOOST_STACKTRACE_TEST_COM_PREINIT_ST - : windbg_cached_lib_threaded_com_st ] - [ run test_void_ptr_cast.cpp ] [ run test_num_conv.cpp ] ; diff --git a/test/thread_safety_checking.cpp b/test/thread_safety_checking.cpp index 215fe86..5254c3b 100644 --- a/test/thread_safety_checking.cpp +++ b/test/thread_safety_checking.cpp @@ -41,18 +41,7 @@ void main_test_loop() { } } -#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT) || defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST) -# include -# include "dbgeng.h" -#endif - int main() { -#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT) - ::CoInitializeEx(0, COINIT_MULTITHREADED); -#elif defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST) - ::CoInitializeEx(0, COINIT_APARTMENTTHREADED); -#endif - boost::timer::auto_cpu_timer t; boost::thread t1(main_test_loop); @@ -64,9 +53,5 @@ int main() { t2.join(); t3.join(); -#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT) || defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST) - ::CoUninitialize(); -#endif - return boost::report_errors(); }