[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.
This commit is contained in:
Raphael Isemann 2020-02-27 11:46:10 +01:00
parent 014728413f
commit 4bb3cb2bcb
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}