}
// Split the raw command into var_name and value pair.
- llvm::StringRef raw_str(command);
- std::string var_value_string = raw_str.split(var_name).second.str();
- const char *var_value_cstr =
- Args::StripSpaces(var_value_string, true, false, false);
+ llvm::StringRef var_value(command);
+ var_value = var_value.split(var_name).second.ltrim();
Status error;
- if (m_options.m_global) {
+ if (m_options.m_global)
error = GetDebugger().SetPropertyValue(nullptr, eVarSetOperationAssign,
- var_name, var_value_cstr);
- }
+ var_name, var_value);
if (error.Success()) {
// FIXME this is the same issue as the one in commands script import
ExecutionContext exe_ctx(m_exe_ctx);
m_exe_ctx.Clear();
error = GetDebugger().SetPropertyValue(&exe_ctx, eVarSetOperationAssign,
- var_name, var_value_cstr);
+ var_name, var_value);
}
if (error.Fail()) {
}
// Split the raw command into var_name and value pair.
- llvm::StringRef raw_str(command);
- std::string var_value_string = raw_str.split(var_name).second.str();
- const char *var_value_cstr =
- Args::StripSpaces(var_value_string, true, true, false);
+ llvm::StringRef var_value(command);
+ var_value = var_value.split(var_name).second.trim();
Status error(GetDebugger().SetPropertyValue(
- &m_exe_ctx, eVarSetOperationRemove, var_name, var_value_cstr));
+ &m_exe_ctx, eVarSetOperationRemove, var_name, var_value));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
}
// Split the raw command into var_name, index_value, and value triple.
- llvm::StringRef raw_str(command);
- std::string var_value_string = raw_str.split(var_name).second.str();
- const char *var_value_cstr =
- Args::StripSpaces(var_value_string, true, true, false);
+ llvm::StringRef var_value(command);
+ var_value = var_value.split(var_name).second.trim();
Status error(GetDebugger().SetPropertyValue(
- &m_exe_ctx, eVarSetOperationReplace, var_name, var_value_cstr));
+ &m_exe_ctx, eVarSetOperationReplace, var_name, var_value));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
}
// Split the raw command into var_name, index_value, and value triple.
- llvm::StringRef raw_str(command);
- std::string var_value_string = raw_str.split(var_name).second.str();
- const char *var_value_cstr =
- Args::StripSpaces(var_value_string, true, true, false);
+ llvm::StringRef var_value(command);
+ var_value = var_value.split(var_name).second.trim();
Status error(GetDebugger().SetPropertyValue(
- &m_exe_ctx, eVarSetOperationInsertBefore, var_name, var_value_cstr));
+ &m_exe_ctx, eVarSetOperationInsertBefore, var_name, var_value));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
}
// Split the raw command into var_name, index_value, and value triple.
- llvm::StringRef raw_str(command);
- std::string var_value_string = raw_str.split(var_name).second.str();
- const char *var_value_cstr =
- Args::StripSpaces(var_value_string, true, true, false);
+ llvm::StringRef var_value(command);
+ var_value = var_value.split(var_name).second.trim();
Status error(GetDebugger().SetPropertyValue(
- &m_exe_ctx, eVarSetOperationInsertAfter, var_name, var_value_cstr));
+ &m_exe_ctx, eVarSetOperationInsertAfter, var_name, var_value));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
// character string later on.
// Split the raw command into var_name and value pair.
- llvm::StringRef raw_str(command);
- std::string var_value_string = raw_str.split(var_name).second.str();
- const char *var_value_cstr =
- Args::StripSpaces(var_value_string, true, true, false);
+ llvm::StringRef var_value(command);
+ var_value = var_value.split(var_name).second.trim();
Status error(GetDebugger().SetPropertyValue(
- &m_exe_ctx, eVarSetOperationAppend, var_name, var_value_cstr));
+ &m_exe_ctx, eVarSetOperationAppend, var_name, var_value));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);