Skip to content
Commit fd37d489 authored by Ilya Nozhkin's avatar Ilya Nozhkin Committed by Chuanqi Xu
Browse files

Set error message if ValueObjectRegister fails to write back to register

SetValueFromCString and SetData methods return false if register can't
be written but they don't set a error message. It sometimes confuses
callers of these methods because they try to get the error message in case of
failure but Status::AsCString returns nullptr.

For example, lldb-vscode crashes due to this bug if some register can't
be written. It invokes SBError::GetCString in case of error and doesn't
check whether the result is nullptr (see request_setVariable implementation in
lldb-vscode.cpp for more info).

Reviewed By: labath, clayborg

Differential Revision: https://reviews.llvm.org/D120319
parent b496a172
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment