summaryrefslogtreecommitdiff
path: root/lldb/source/API/SBThread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBThread.cpp')
-rw-r--r--lldb/source/API/SBThread.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index 69342b972a2c..a88e8442986d 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -325,8 +325,11 @@ size_t SBThread::GetStopDescription(char *dst, size_t dst_len) {
StopInfoSP stop_info_sp = exe_ctx.GetThreadPtr()->GetStopInfo();
if (stop_info_sp) {
- const char *stop_desc = stop_info_sp->GetDescription();
- if (stop_desc) {
+ std::string thread_stop_desc =
+ exe_ctx.GetThreadPtr()->GetStopDescription();
+ const char *stop_desc = thread_stop_desc.c_str();
+
+ if (stop_desc[0] != '\0') {
if (dst)
return ::snprintf(dst, dst_len, "%s", stop_desc);
else {