[llbd] Finish Turn lldb_private::Status into a value type. (#10616) (#112420)

Fix a few bare Status() invocations that were missed in the conversion.
This is sufficent to build lldb on FreeBSD/aaarch64.

Fixes: 0642cd768b80
This commit is contained in:
Brooks Davis 2024-10-16 12:41:38 -07:00 committed by GitHub
parent 36d936a2d0
commit ad5e2bf6e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,17 +119,15 @@ NativeRegisterContextFreeBSD_arm64::ReadRegister(const RegisterInfo *reg_info,
RegisterValue &reg_value) {
Status error;
if (!reg_info) {
error = Status::FromErrorString("reg_info NULL");
return error;
}
if (!reg_info)
return Status::FromErrorString("reg_info NULL");
const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
if (reg == LLDB_INVALID_REGNUM)
return Status("no lldb regnum for %s", reg_info && reg_info->name
? reg_info->name
: "<unknown register>");
return Status::FromErrorStringWithFormat(
"no lldb regnum for %s",
reg_info && reg_info->name ? reg_info->name : "<unknown register>");
uint32_t set = GetRegisterInfo().GetRegisterSetFromRegisterIndex(reg);
error = ReadRegisterSet(set);
@ -147,14 +145,14 @@ Status NativeRegisterContextFreeBSD_arm64::WriteRegister(
Status error;
if (!reg_info)
return Status("reg_info NULL");
return Status::FromErrorString("reg_info NULL");
const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
if (reg == LLDB_INVALID_REGNUM)
return Status("no lldb regnum for %s", reg_info && reg_info->name
? reg_info->name
: "<unknown register>");
return Status::FromErrorStringWithFormat(
"no lldb regnum for %s",
reg_info && reg_info->name ? reg_info->name : "<unknown register>");
uint32_t set = GetRegisterInfo().GetRegisterSetFromRegisterIndex(reg);
error = ReadRegisterSet(set);