} else {
result->AppendError(
"SBCommandInterpreter or the command line is not valid");
- result->SetStatus(eReturnStatusFailed);
}
return result.GetStatus();
if (!IsValid()) {
result->AppendError("SBCommandInterpreter is not valid.");
- result->SetStatus(eReturnStatusFailed);
return;
}
SBStream s;
file.GetDescription(s);
result->AppendErrorWithFormat("File is not valid: %s.", s.GetData());
- result->SetStatus(eReturnStatusFailed);
}
FileSpec tmp_spec = file.ref();
} else {
result->AppendError(
"SBCommandInterpreter or the command line is not valid");
- result->SetStatus(eReturnStatusFailed);
}
}
m_opaque_ptr->SourceInitFileHome(result.ref());
} else {
result->AppendError("SBCommandInterpreter is not valid");
- result->SetStatus(eReturnStatusFailed);
}
}
m_opaque_ptr->SourceInitFileHome(result.ref(), is_repl);
} else {
result->AppendError("SBCommandInterpreter is not valid");
- result->SetStatus(eReturnStatusFailed);
}
}
m_opaque_ptr->SourceInitFileCwd(result.ref());
} else {
result->AppendError("SBCommandInterpreter is not valid");
- result->SetStatus(eReturnStatusFailed);
}
}
if (!error.Success()) {
new_args.Clear();
result.AppendError(error.AsCString());
- result.SetStatus(eReturnStatusFailed);
return;
} else
names_found.insert(std::string(current_arg));
new_args.Clear();
result.AppendErrorWithFormat("'%d' is not a valid breakpoint ID.\n",
bp_id->GetBreakpointID());
- result.SetStatus(eReturnStatusFailed);
return;
}
const size_t num_locations = breakpoint_sp->GetNumLocations();
new_args.Clear();
result.AppendErrorWithFormat("'%s' is not a valid breakpoint ID.\n",
range_from.str().c_str());
- result.SetStatus(eReturnStatusFailed);
return;
}
new_args.Clear();
result.AppendErrorWithFormat("'%s' is not a valid breakpoint ID.\n",
range_to.str().c_str());
- result.SetStatus(eReturnStatusFailed);
return;
}
break_id_t start_bp_id = start_bp->GetBreakpointID();
"both ends of range must specify"
" a breakpoint location, or neither can "
"specify a breakpoint location.");
- result.SetStatus(eReturnStatusFailed);
return;
}
" must be within the same major breakpoint; you specified two"
" different major breakpoints, %d and %d.\n",
start_bp_id, end_bp_id);
- result.SetStatus(eReturnStatusFailed);
return;
}
}
if (!args_or) {
result.AppendError(toString(args_or.takeError()));
result.AppendError("Unable to create requested alias.\n");
- result.SetStatus(eReturnStatusFailed);
return false;
}
args = std::move(*args_or);
"need at least %d arguments to use "
"this alias.\n",
index);
- result.SetStatus(eReturnStatusFailed);
return nullptr;
} else {
size_t strpos = raw_input_string.find(cmd_args.GetArgumentAtIndex(index));
if (WasInterrupted()) {
result.AppendError("interrupted");
- result.SetStatus(eReturnStatusFailed);
return false;
}
} else {
result.AppendErrorWithFormat("Could not find entry: %s in history",
command_string.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
}
if (m_command_history.IsEmpty()) {
result.AppendError("empty command");
- result.SetStatus(eReturnStatusFailed);
return false;
}
original_command_string = command_line;
if (m_repeat_command.empty()) {
result.AppendError("No auto repeat.");
- result.SetStatus(eReturnStatusFailed);
return false;
}
if (error.Fail()) {
result.AppendError(error.AsCString());
- result.SetStatus(eReturnStatusFailed);
return false;
}
"need at least %d arguments to use "
"this alias.\n",
index);
- result.SetStatus(eReturnStatusFailed);
return;
} else {
// Find and remove cmd_args.GetArgumentAtIndex(i) from raw_input_string
result.SetStatus(eReturnStatusSuccessFinishNoResult);
} else {
result.AppendError(InitFileWarning);
- result.SetStatus(eReturnStatusFailed);
}
}
}
"Aborting reading of commands after command #%" PRIu64
": '%s' failed with %s",
(uint64_t)idx, cmd, error_msg.str().c_str());
- result.SetStatus(eReturnStatusFailed);
m_debugger.SetAsyncExecution(old_async_execution);
return;
} else if (options.GetPrintResults()) {
result.AppendErrorWithFormat(
"Error reading commands from file %s - file not found.\n",
cmd_file.GetFilename().AsCString("<Unknown>"));
- result.SetStatus(eReturnStatusFailed);
return;
}
result.AppendErrorWithFormatv(
"error: an error occurred read file '{0}': {1}\n", cmd_file_path,
llvm::fmt_consume(input_file_up.takeError()));
- result.SetStatus(eReturnStatusFailed);
return;
}
FileSP input_file_sp = FileSP(std::move(input_file_up.get()));
result.AppendErrorWithFormat("'%s' is not a valid command.\n",
next_word.c_str());
}
- result.SetStatus(eReturnStatusFailed);
return nullptr;
}
cmd_obj->GetCommandName().str().c_str(),
next_word.empty() ? "" : next_word.c_str(),
next_word.empty() ? " -- " : " ", suffix.c_str());
- result.SetStatus(eReturnStatusFailed);
return nullptr;
}
} else {
result.AppendErrorWithFormat(
"the '%s' command doesn't support the --gdb-format option\n",
cmd_obj->GetCommandName().str().c_str());
- result.SetStatus(eReturnStatusFailed);
return nullptr;
}
}
default:
result.AppendErrorWithFormat(
"unknown command shorthand suffix: '%s'\n", suffix.c_str());
- result.SetStatus(eReturnStatusFailed);
return nullptr;
}
}
result.SetStatus(eReturnStatusSuccessFinishNoResult);
} else {
result.AppendError("invalid combination of options for the given command");
- result.SetStatus(eReturnStatusFailed);
}
return options_are_valid;
void ScriptInterpreter::CollectDataForBreakpointCommandCallback(
std::vector<std::reference_wrapper<BreakpointOptions>> &bp_options_vec,
CommandReturnObject &result) {
- result.SetStatus(eReturnStatusFailed);
result.AppendError(
"This script interpreter does not support breakpoint callbacks.");
}
void ScriptInterpreter::CollectDataForWatchpointCommandCallback(
WatchpointOptions *bp_options, CommandReturnObject &result) {
- result.SetStatus(eReturnStatusFailed);
result.AppendError(
"This script interpreter does not support watchpoint callbacks.");
}
result.AppendErrorWithFormat("'%s' takes 1 argument of reduction name, "
"and an optional kernel type list",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
auto coord = m_options.m_have_coord ? &m_options.m_coord : nullptr;
if (!runtime->PlaceBreakpointOnReduction(target, outstream, name, coord,
m_options.m_kernel_types)) {
- result.SetStatus(eReturnStatusFailed);
result.AppendError("Error: unable to place breakpoint on reduction");
return false;
}
result.AppendErrorWithFormat(
"'%s' takes 1 argument of kernel name, and an optional coordinate.",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
auto name = command.GetArgumentAtIndex(0);
auto coord = m_options.m_have_coord ? &m_options.m_coord : nullptr;
if (!runtime->PlaceBreakpointOnKernel(target, outstream, name, coord)) {
- result.SetStatus(eReturnStatusFailed);
result.AppendErrorWithFormat(
"Error: unable to set breakpoint on kernel '%s'", name);
return false;
if (argc != 1) {
result.AppendErrorWithFormat(
"'%s' takes 1 argument of 'enable' or 'disable'", m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
} else {
result.AppendErrorWithFormat(
"Argument must be either 'enable' or 'disable'");
- result.SetStatus(eReturnStatusFailed);
return false;
}
result.AppendErrorWithFormat("'%s' takes 1 argument, an allocation ID. "
"As well as an optional -f argument",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
if (!success) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
- result.SetStatus(eReturnStatusFailed);
return false;
}
std::string error = llvm::toString(file.takeError());
result.AppendErrorWithFormat("Couldn't open file '%s': %s",
path.c_str(), error.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
} else
result.AppendErrorWithFormat(
"'%s' takes 2 arguments, an allocation ID and filename to read from.",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
if (!success) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
- result.SetStatus(eReturnStatusFailed);
return false;
}
result.AppendErrorWithFormat(
"'%s' takes 2 arguments, an allocation ID and filename to read from.",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
if (!success) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
- result.SetStatus(eReturnStatusFailed);
return false;
}
if (!m_command_byte.GetOptionValue().OptionWasSet()) {
result.AppendError(
"the --command option must be set to a valid command byte");
- result.SetStatus(eReturnStatusFailed);
} else {
const uint64_t command_byte =
m_command_byte.GetOptionValue().GetUInt64Value(0);
"even number of ASCII hex "
"characters: '%s'",
ascii_hex_bytes_cstr);
- result.SetStatus(eReturnStatusFailed);
return false;
}
payload_bytes.resize(ascii_hex_bytes_cstr_len / 2);
"ASCII hex characters (no "
"spaces or hex prefixes): '%s'",
ascii_hex_bytes_cstr);
- result.SetStatus(eReturnStatusFailed);
return false;
}
}
else
result.AppendErrorWithFormat("unknown error 0x%8.8x",
error.GetError());
- result.SetStatus(eReturnStatusFailed);
return false;
}
} else {
result.AppendErrorWithFormat("process must be stopped in order "
"to send KDP packets, state is %s",
StateAsCString(state));
- result.SetStatus(eReturnStatusFailed);
}
} else {
result.AppendError("invalid process");
- result.SetStatus(eReturnStatusFailed);
}
} else {
result.AppendErrorWithFormat("invalid command byte 0x%" PRIx64
", valid values are 1 - 255",
command_byte);
- result.SetStatus(eReturnStatusFailed);
}
}
} else {
result.AppendErrorWithFormat("'%s' takes no arguments, only options.",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
}
return false;
}
"amount to be transferred when "
"reading/writing",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
result.AppendErrorWithFormat(
"'%s' takes a one or more packet content arguments",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
if (command.empty()) {
result.AppendErrorWithFormat("'%s' takes a command string argument",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
if (argc > 0) {
result.AppendErrorWithFormat("'%s' take no arguments, only options",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
SetDefaultOptionsIfNoneAreSet();
StructuredDataDarwinLog::GetStaticPluginName())) {
result.AppendError("failed to get StructuredDataPlugin for "
"the process");
- result.SetStatus(eReturnStatusFailed);
}
StructuredDataDarwinLog &plugin =
*static_cast<StructuredDataDarwinLog *>(plugin_sp.get());
// Report results.
if (!error.Success()) {
result.AppendError(error.AsCString());
- result.SetStatus(eReturnStatusFailed);
// Our configuration failed, so we're definitely disabled.
plugin.SetEnabled(false);
} else {