[Lldb-commits] [PATCH] D53309: Return a useful "Error" for an expression that completes but produces no result
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 15 18:37:16 PDT 2018
jingham created this revision.
Herald added subscribers: lldb-commits, abidh, JDevlieghere.
When you run an expression like:
(lldb) expr int $x = 10
the expression has no result. The ValueObject (and then SBValue) you get back from the expression signals that by putting an error indicating this in the Status object returned by SBValue::GetError(). Unfortunately, this error was not terribly helpful. The error number was a private constant that only UserExpression knew about, and the error string was unset. This meant you couldn't really trust the result of SBValue.GetError().Success() when you ran an expression.
This commit adds an eExpressionProducedNoResult constant to the ExpressionResults enum, and used that and an appropriate string in the error object. So now you can usefully tell the difference between an expression that produces no result and one that failed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7219 bytes
Desc: not available
More information about the lldb-commits