Skip to content

Commit

Permalink
[lldb] Show the actual error when 'watchpoint set expression' failed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Teemperor committed Feb 27, 2020
1 parent 0147284 commit 4bb3cb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lldb/source/Commands/CommandObjectWatchpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4bb3cb2

Please sign in to comment.