aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/symbol.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-24 01:34:52 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-24 02:06:22 +0300
commitc073ed8f702e98ec56ed05e0c02167e355e6ee31 (patch)
treef726a5830ed4f47724ac6c447571398ef5b12ea2 /src/symbol.cpp
parentadd Process class (diff)
downloadwinapi-debug-c073ed8f702e98ec56ed05e0c02167e355e6ee31.tar.gz
winapi-debug-c073ed8f702e98ec56ed05e0c02167e355e6ee31.zip
switch to Boost.Nowide everywhere
Diffstat (limited to '')
-rw-r--r--src/symbol.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/symbol.cpp b/src/symbol.cpp
index e679f4a..1973f0b 100644
--- a/src/symbol.cpp
+++ b/src/symbol.cpp
@@ -5,6 +5,8 @@
#include "pdb/all.hpp"
+#include <boost/nowide/convert.hpp>
+
#include <SafeInt.hpp>
#include <dbghelp.h>
@@ -13,6 +15,7 @@
#include <cstddef>
#include <cstring>
#include <stdexcept>
+#include <string>
namespace pdb {
namespace {
@@ -51,7 +54,12 @@ SymbolInfo::SymbolInfo(const Impl& impl) : SymbolInfo{} {
std::memcpy(buffer.data(), &impl, impl_size);
}
+std::string SymbolInfo::get_name() const {
+ return boost::nowide::narrow(std::wstring{get_impl().Name, get_impl().NameLen});
+}
+
LineInfo::LineInfo(const Impl& impl)
- : file_path{impl.FileName}, line_number{cast_line_number(impl.LineNumber)} {}
+ : file_path{boost::nowide::narrow(impl.FileName)},
+ line_number{cast_line_number(impl.LineNumber)} {}
} // namespace pdb