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
Loading
Please sign in to comment