bool success = breakpoint_dict->GetValueForKeyAsDictionary(
BreakpointResolver::GetSerializationKey(), resolver_dict);
if (!success) {
- error.SetErrorStringWithFormat(
- "Breakpoint data missing toplevel resolver key");
+ error.SetErrorString("Breakpoint data missing toplevel resolver key");
return result_sp;
}
error.Clear();
if (str.empty())
{
- error.SetErrorStringWithFormat("Empty breakpoint names are not allowed");
+ error.SetErrorString("Empty breakpoint names are not allowed");
return false;
}
((start_loc_id != LLDB_INVALID_BREAK_ID) &&
(end_loc_id == LLDB_INVALID_BREAK_ID))) {
new_args.Clear();
- result.AppendErrorWithFormat("Invalid breakpoint id range: Either "
- "both ends of range must specify"
- " a breakpoint location, or neither can "
- "specify a breakpoint location.\n");
+ result.AppendError("Invalid breakpoint id range: Either "
+ "both ends of range must specify"
+ " a breakpoint location, or neither can "
+ "specify a breakpoint location.\n");
result.SetStatus(eReturnStatusFailed);
return;
}
else {
ScriptInterpreter *interp = target.GetDebugger().GetScriptInterpreter();
if (!interp) {
- error.SetErrorStringWithFormat(
+ error.SetErrorString(
"Can't set script commands - no script interpreter");
return nullptr;
}
GetSerializationSubclassKey(), subclass_name);
if (!success) {
- error.SetErrorStringWithFormat(
- "Resolver data missing subclass resolver key");
+ error.SetErrorString("Resolver data missing subclass resolver key");
return result_sp;
}
success =
options_dict.GetValueForKeyAsInteger(GetKey(OptionNames::Offset), offset);
if (!success) {
- error.SetErrorStringWithFormat("BRN::CFSD: Missing offset entry.");
+ error.SetErrorString("BRN::CFSD: Missing offset entry.");
return nullptr;
}
success = options_dict.GetValueForKeyAsBoolean(
GetKey(OptionNames::SkipPrologue), skip_prologue);
if (!success) {
- error.SetErrorStringWithFormat("BRN::CFSD: Missing Skip prologue entry.");
+ error.SetErrorString("BRN::CFSD: Missing Skip prologue entry.");
return nullptr;
}
success = options_dict.GetValueForKeyAsArray(
GetKey(OptionNames::SymbolNameArray), names_array);
if (!success) {
- error.SetErrorStringWithFormat("BRN::CFSD: Missing symbol names entry.");
+ error.SetErrorString("BRN::CFSD: Missing symbol names entry.");
return nullptr;
}
StructuredData::Array *names_mask_array;
success = options_dict.GetValueForKeyAsArray(
GetKey(OptionNames::NameMaskArray), names_mask_array);
if (!success) {
- error.SetErrorStringWithFormat(
- "BRN::CFSD: Missing symbol names mask entry.");
+ error.SetErrorString("BRN::CFSD: Missing symbol names mask entry.");
return nullptr;
}
error.SetErrorStringWithFormat(
"cannot locate a module for UUID '%s'", uuid_str.c_str());
else
- error.SetErrorStringWithFormat("cannot locate a module");
+ error.SetErrorString("cannot locate a module");
}
}
}
bool success = filter_dict.GetValueForKeyAsString(
GetSerializationSubclassKey(), subclass_name);
if (!success) {
- error.SetErrorStringWithFormat("Filter data missing subclass key");
+ error.SetErrorString("Filter data missing subclass key");
return result_sp;
}
return error; // Success;
}
- error.SetErrorStringWithFormat("extracting data from value failed");
+ error.SetErrorString("extracting data from value failed");
break;
}
case eValueTypeLoadAddress:
if (address_type == eAddressTypeHost) {
// The address is an address in this process, so just copy it.
if (address == 0) {
- error.SetErrorStringWithFormat(
- "trying to read from host address of 0.");
+ error.SetErrorString("trying to read from host address of 0.");
return error;
}
memcpy(dst, reinterpret_cast<uint8_t *>(address), byte_size);
address_type);
}
} else {
- error.SetErrorStringWithFormat("out of memory");
+ error.SetErrorString("out of memory");
}
return error;
Value &value) {
if (reg_ctx == nullptr) {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat("No register context in frame.\n");
+ error_ptr->SetErrorString("No register context in frame.\n");
} else {
uint32_t native_reg =
reg_ctx->ConvertRegisterKindToRegisterNumber(reg_kind, reg_num);
LLDB_INVALID_ADDRESS);
if (!module_sp) {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
+ error_ptr->SetErrorString(
"need module to resolve file address for DW_OP_deref");
return false;
}
Address so_addr;
if (!module_sp->ResolveFileAddress(file_addr, so_addr)) {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
+ error_ptr->SetErrorString(
"failed to resolve file address in module");
return false;
}
addr_t load_Addr = so_addr.GetLoadAddress(exe_ctx->GetTargetPtr());
if (load_Addr == LLDB_INVALID_ADDRESS) {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
- "failed to resolve load address");
+ error_ptr->SetErrorString("failed to resolve load address");
return false;
}
stack.back().GetScalar() = load_Addr;
}
} else {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
- "NULL process for DW_OP_deref.\n");
+ error_ptr->SetErrorString("NULL process for DW_OP_deref.\n");
return false;
}
} else {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
+ error_ptr->SetErrorString(
"NULL execution context for DW_OP_deref.\n");
return false;
}
}
} else {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
- "NULL process for DW_OP_deref.\n");
+ error_ptr->SetErrorString("NULL process for DW_OP_deref.\n");
return false;
}
} else {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
+ error_ptr->SetErrorString(
"NULL execution context for DW_OP_deref.\n");
return false;
}
}
} else {
if (error_ptr)
- error_ptr->SetErrorStringWithFormat(
+ error_ptr->SetErrorString(
"NULL execution context for DW_OP_fbreg.\n");
return false;
}
// Check we can actually get a thread
if (exe_ctx.GetThreadPtr() == nullptr) {
error.SetErrorToGenericError();
- error.SetErrorStringWithFormat("unable to acquire thread");
+ error.SetErrorString("unable to acquire thread");
return false;
}
// Make sure we have a valid process
if (!exe_ctx.GetProcessPtr()) {
error.SetErrorToGenericError();
- error.SetErrorStringWithFormat("unable to get the process");
+ error.SetErrorString("unable to get the process");
return false;
}
static lldb_private::ABI::CallArgument rawArgs[16];
if (numArgs >= 16) {
error.SetErrorToGenericError();
- error.SetErrorStringWithFormat("function takes too many arguments");
+ error.SetErrorString("function takes too many arguments");
return false;
}
// Check that the thread plan completed successfully
if (res != lldb::ExpressionResults::eExpressionCompleted) {
error.SetErrorToGenericError();
- error.SetErrorStringWithFormat("ThreadPlanCallFunctionUsingABI failed");
+ error.SetErrorString("ThreadPlanCallFunctionUsingABI failed");
return false;
}
// Check if the return value is valid
if (vobj == nullptr || !retVal) {
error.SetErrorToGenericError();
- error.SetErrorStringWithFormat("unable to get the return value");
+ error.SetErrorString("unable to get the return value");
return false;
}
llvm::Optional<size_t> opt_bit_align = m_type.GetTypeBitAlign(exe_scope);
if (!opt_bit_align) {
- err.SetErrorStringWithFormat("can't get the type alignment");
+ err.SetErrorString("can't get the type alignment");
return;
}
command_string = command_line;
original_command_string = command_line;
if (m_repeat_command.empty()) {
- result.AppendErrorWithFormat("No auto repeat.\n");
+ result.AppendError("No auto repeat.\n");
result.SetStatus(eReturnStatusFailed);
return false;
}
llvm::sys::path::parent_path(home_init_file)) {
result.SetStatus(eReturnStatusSuccessFinishNoResult);
} else {
- result.AppendErrorWithFormat(InitFileWarning);
+ result.AppendError(InitFileWarning);
result.SetStatus(eReturnStatusFailed);
}
}
VarSetOperationType op, llvm::StringRef name,
llvm::StringRef value) {
Status error;
- error.SetErrorStringWithFormat("SetSubValue is not supported");
+ error.SetErrorString("SetSubValue is not supported");
return error;
}
if (first_char == '"' || first_char == '\'') {
const size_t trimmed_len = trimmed_value_str.size();
if (trimmed_len == 1 || value_str[trimmed_len - 1] != first_char) {
- error.SetErrorStringWithFormat("mismatched quotes");
+ error.SetErrorString("mismatched quotes");
return error;
}
value_str = trimmed_value_str.substr(1, trimmed_len - 2);
&long_options_index);
if (val == ':') {
- error.SetErrorStringWithFormat("last option requires an argument");
+ error.SetErrorString("last option requires an argument");
break;
}
// Did we get an error?
if (val == '?') {
- error.SetErrorStringWithFormat("unknown or ambiguous option");
+ error.SetErrorString("unknown or ambiguous option");
break;
}
// The option auto-set itself
if (m_thread_list.WillResume()) {
// Last thing, do the PreResumeActions.
if (!RunPreResumeActions()) {
- error.SetErrorStringWithFormat(
+ error.SetErrorString(
"Process::PrivateResume PreResumeActions failed, not resuming.");
} else {
m_mod_id.BumpResumeID();