aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/symbol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/symbol.cpp')
-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