diff options
author | Raphael Isemann <teemperor@gmail.com> | 2020-02-27 11:46:10 +0100 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2020-02-27 12:06:51 +0100 |
commit | 4bb3cb2bcb59d2139dfd9fbaa7c475dcf8507242 (patch) | |
tree | 11fb245dacb2032a07445b92ad44ca33e6c25b2e /lldb/source/Commands/CommandObjectWatchpoint.cpp | |
parent | 014728413f354c8f44375074b331e68ce194bbd2 (diff) | |
download | llvm-4bb3cb2bcb59d2139dfd9fbaa7c475dcf8507242.zip llvm-4bb3cb2bcb59d2139dfd9fbaa7c475dcf8507242.tar.gz llvm-4bb3cb2bcb59d2139dfd9fbaa7c475dcf8507242.tar.bz2 |
[lldb] Show the actual error when 'watchpoint set expression' failed
Currently we only show the user that the expression failed but not
what is actually wrong with it. This just dumps the error we get
back alongside the other output to the error stream.
This should also help with finding out with why sometimees the
TestWatchLocationWithWatchSet.py test fails here on the LLDB
incremental bot on Green Dragon.
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectWatchpoint.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index 2eadcd6..e0dfbd4 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -1070,6 +1070,8 @@ protected: result.GetErrorStream().Printf( "error: expression evaluation of address to watch failed\n"); result.GetErrorStream() << "expression evaluated: \n" << expr << "\n"; + if (valobj_sp && !valobj_sp->GetError().Success()) + result.GetErrorStream() << valobj_sp->GetError().AsCString() << "\n"; result.SetStatus(eReturnStatusFailed); return false; } |