--- include/boost/stacktrace/detail/frame_msvc.ipp 1970-01-01 03:00:00.000000000 +0300 +++ include/boost/stacktrace/detail/frame_msvc.ipp 2017-04-12 14:49:18.430131300 +0300 @@ -20,7 +20,8 @@ #include #include "dbgeng.h" -#include +#include +#include #ifdef BOOST_MSVC # pragma comment(lib, "ole32.lib") @@ -39,6 +39,12 @@ DEFINE_GUID(IID_IDebugSymbols,0x8c31e98c,0x983a,0x48a5,0x90,0x16,0x6f,0xe5,0xd6,0x67,0xa9,0x50); #endif +#ifdef __CRT_UUID_DECL // for __MINGW32__ +__CRT_UUID_DECL(IDebugClient,0x27fe5639,0x8407,0x4f47,0x83,0x64,0xee,0x11,0x8f,0xb0,0x8a,0xc8); +__CRT_UUID_DECL(IDebugControl,0x5182e668,0x105e,0x416e,0xad,0x92,0x24,0xef,0x80,0x04,0x24,0xba); +__CRT_UUID_DECL(IDebugSymbols,0x8c31e98c,0x983a,0x48a5,0x90,0x16,0x6f,0xe5,0xd6,0x67,0xa9,0x50); +#endif + // Testing. Remove later //# define __uuidof(x) ::IID_ ## x @@ -221,7 +227,16 @@ std::string module_name; std::string name = boost::stacktrace::detail::get_name_impl(idebug, addr, &module_name); if (!name.empty()) { - res += name; + const auto uname = "_" + name; + const auto demName = boost::core::demangle(uname.c_str()); + if (demName != uname) //demangle works + { + res += demName; + } + else + { + res += name; + } } else { res += to_hex_array(addr).data(); } --- include/boost/stacktrace/detail/safe_dump_win.ipp 1970-01-01 03:00:00.000000000 +0300 +++ include/boost/stacktrace/detail/safe_dump_win.ipp 2017-04-12 14:13:09.717345500 +0300 @@ -16,10 +16,10 @@ #include -#include +#include #include #include -#include +#include #include // CaptureStackBackTrace @@ -36,11 +36,11 @@ std::size_t dump(const char* file, void** memory, std::size_t mem_size) BOOST_NOEXCEPT { void* const fd = boost::detail::winapi::CreateFileA( file, - boost::detail::winapi::GENERIC_WRITE_, + boost::interprocess::winapi::generic_write, 0, 0, - boost::detail::winapi::CREATE_ALWAYS_, - boost::detail::winapi::FILE_ATTRIBUTE_NORMAL_, + boost::interprocess::winapi::create_always, + boost::interprocess::winapi::file_attribute_normal, 0 );