[lldb] Set result error state in 'frame variable'
authorDave Lee <davelee.com@gmail.com>
Fri, 7 Jan 2022 03:38:31 +0000 (19:38 -0800)
committerDave Lee <davelee.com@gmail.com>
Sat, 15 Jan 2022 22:20:12 +0000 (14:20 -0800)
commit696f9706f34d76bca8f8d496eabe1a67b60e8a54
tree5d219c4ecc937b98353f8d14c7d09a475e128edc
parentc63a3175c2947e8c1a2d3bbe16a8586600705c54
[lldb] Set result error state in 'frame variable'

Ensure that errors in `frame variable` are reflected in result object.

The statistics for `frame variable` show invocations as being successful, even
when executing one of the error paths.

This change replaces `result.GetErrorStream()` with `result.AppendError()`,
which also sets the status to `eReturnStatusFailed`.

Differential Revision: https://reviews.llvm.org/D116788

Recommitting after D116901 and D116863.

(cherry picked from commit 2c7d10c41278181e3e45c68f28b501cd95193a8a)
lldb/source/Commands/CommandObjectFrame.cpp