Send source file and source line requests to the backend s

This commit is contained in:
Antony Polukhin
2016-11-17 22:12:39 +03:00
parent 4320fc2a14
commit db56639833
7 changed files with 45 additions and 4 deletions

View File

@@ -49,6 +49,14 @@ struct backtrace_holder {
return frames[frame].addr;
}
inline std::string get_source_file(std::size_t /*frame*/) const {
return std::string();
}
inline std::size_t get_source_line(std::size_t /*frame*/) const BOOST_NOEXCEPT {
return 0;
}
inline std::string get_frame(std::size_t frame) const {
if (frame < frames_count) {
return frames[frame].name;

View File

@@ -34,6 +34,14 @@ struct backtrace_holder {
return buffer[frame];
}
inline std::string get_source_file(std::size_t /*frame*/) const {
return std::string();
}
inline std::size_t get_source_line(std::size_t /*frame*/) const BOOST_NOEXCEPT {
return 0;
}
inline std::string get_frame(std::size_t frame) const {
std::string res;
if (frame >= frames_count) {

View File

@@ -24,6 +24,14 @@ struct backtrace_holder {
return 0;
}
inline std::string get_source_file(std::size_t /*frame*/) const {
return std::string();
}
inline std::size_t get_source_line(std::size_t /*frame*/) const BOOST_NOEXCEPT {
return 0;
}
inline std::string get_frame(std::size_t /*frame*/) const {
return std::string();
}

View File

@@ -66,6 +66,14 @@ struct backtrace_holder {
return buffer[frame];
}
inline std::string get_source_file(std::size_t /*frame*/) const {
return std::string();
}
inline std::size_t get_source_line(std::size_t /*frame*/) const BOOST_NOEXCEPT {
return 0;
}
inline std::string get_frame(std::size_t frame) const {
std::string res;

View File

@@ -25,6 +25,7 @@
#pragma comment(lib, "Dbgeng.lib")
namespace boost { namespace stacktrace { namespace detail {
template <class T>
class com_holder: boost::noncopyable {
T* holder_;
@@ -72,6 +73,14 @@ struct backtrace_holder {
return buffer[frame];
}
inline std::string get_source_file(std::size_t /*frame*/) const {
return std::string();
}
inline std::size_t get_source_line(std::size_t /*frame*/) const BOOST_NOEXCEPT {
return 0;
}
static bool try_init_com(com_holder<IDebugSymbols>& idebug_) BOOST_NOEXCEPT {
if (idebug_.is_inited()) {
return true;

View File

@@ -60,11 +60,11 @@ const void* stacktrace::get_address(std::size_t frame) const BOOST_NOEXCEPT {
}
std::string stacktrace::get_source_file(std::size_t frame) const {
return std::string();
return impl_.get_source_file(frame);
}
std::size_t stacktrace::get_source_line(std::size_t frame) const BOOST_NOEXCEPT {
return 0;
return impl_.get_source_line(frame);
}
bool stacktrace::operator< (const stacktrace& rhs) const BOOST_NOEXCEPT {