From 4bb3cb2bcb59d2139dfd9fbaa7c475dcf8507242 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 27 Feb 2020 11:46:10 +0100 Subject: [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. --- lldb/source/Commands/CommandObjectWatchpoint.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp') 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; } -- cgit v1.1