diff options
Diffstat (limited to 'lldb/source/Breakpoint/Watchpoint.cpp')
| -rw-r--r-- | lldb/source/Breakpoint/Watchpoint.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Breakpoint/Watchpoint.cpp b/lldb/source/Breakpoint/Watchpoint.cpp index edb1a0e93460..715e83c76697 100644 --- a/lldb/source/Breakpoint/Watchpoint.cpp +++ b/lldb/source/Breakpoint/Watchpoint.cpp @@ -299,7 +299,9 @@ bool Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const { .SetHideRootType(true) .SetHideRootName(true) .SetHideName(true); - m_old_value_sp->Dump(strm, options); + if (llvm::Error error = m_old_value_sp->Dump(strm, options)) + strm << "error: " << toString(std::move(error)); + if (strm.GetData()) values_ss.Printf("old value: %s", strm.GetData()); } @@ -322,7 +324,9 @@ bool Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const { .SetHideRootType(true) .SetHideRootName(true) .SetHideName(true); - m_new_value_sp->Dump(strm, options); + if (llvm::Error error = m_new_value_sp->Dump(strm, options)) + strm << "error: " << toString(std::move(error)); + if (strm.GetData()) values_ss.Printf("new value: %s", strm.GetData()); } |
