From 5ca9b4bfe65874bd7fbb7805d1ddfcd9ee52ed17 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 3 Jan 2016 08:45:18 +0100 Subject: [PATCH] Added stop reason to debug status --- src/debug.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/debug.cc b/src/debug.cc index 463be8d..858850f 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -123,8 +123,15 @@ void Debug::start(const std::string &command, const boost::filesystem::path &pat std::string event_desc=stream.GetData(); event_desc.pop_back(); auto pos=event_desc.rfind(" = "); - if(status_callback && pos!=std::string::npos) - status_callback(event_desc.substr(pos+3)); + if(status_callback && pos!=std::string::npos) { + auto status=event_desc.substr(pos+3); + if(state==lldb::StateType::eStateStopped) { + char buffer[100]; + auto n=process->GetSelectedThread().GetStopDescription(buffer, 100); + status+=" ("+std::string(buffer, n)+")"; + } + status_callback(status); + } if(state==lldb::StateType::eStateStopped) { auto line_entry=process->GetSelectedThread().GetSelectedFrame().GetLineEntry();