diff options
Diffstat (limited to 'boost/stacktrace/detail/frame_msvc.ipp')
-rw-r--r-- | boost/stacktrace/detail/frame_msvc.ipp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/boost/stacktrace/detail/frame_msvc.ipp b/boost/stacktrace/detail/frame_msvc.ipp index 3159129903..21f6f90a7c 100644 --- a/boost/stacktrace/detail/frame_msvc.ipp +++ b/boost/stacktrace/detail/frame_msvc.ipp @@ -98,7 +98,7 @@ public: }; -static std::string mingw_demangling_workaround(const std::string& s) { +inline std::string mingw_demangling_workaround(const std::string& s) { #ifdef BOOST_GCC if (s.empty()) { return s; @@ -114,6 +114,12 @@ static std::string mingw_demangling_workaround(const std::string& s) { #endif } +inline void trim_right_zeroes(std::string& s) { + while (s.back() == '\0') { + s.pop_back(); + } +} + class debugging_symbols: boost::noncopyable { static void try_init_com(com_holder< ::IDebugSymbols>& idebug, const com_global_initer& com) BOOST_NOEXCEPT { com_holder< ::IDebugClient> iclient(com); @@ -217,6 +223,7 @@ public: &size, 0 )); + trim_right_zeroes(result); } else if (res) { result = name; } @@ -301,6 +308,7 @@ public: &size, 0 )); + trim_right_zeroes(result.first); result.second = line_num; if (!res) { |