Author: Raphael Isemann Date: 2020-02-27T12:06:51+01:00 New Revision: 4bb3cb2bcb59d2139dfd9fbaa7c475dcf8507242
URL: https://github.com/llvm/llvm-project/commit/4bb3cb2bcb59d2139dfd9fbaa7c475dcf8507242 DIFF: https://github.com/llvm/llvm-project/commit/4bb3cb2bcb59d2139dfd9fbaa7c475dcf8507242.diff LOG: [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. Added: Modified: lldb/source/Commands/CommandObjectWatchpoint.cpp Removed: ################################################################################ diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index 2eadcd6cd67b..e0dfbd40b8fb 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -1070,6 +1070,8 @@ class CommandObjectWatchpointSetExpression : public CommandObjectRaw { 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; } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits