summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectArgs.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp22
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp20
-rw-r--r--lldb/source/Commands/CommandObjectDisassemble.cpp10
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp8
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectHelp.h2
-rw-r--r--lldb/source/Commands/CommandObjectLog.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp32
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp10
-rw-r--r--lldb/source/Commands/CommandObjectRegister.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp10
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp22
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp22
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp34
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp8
18 files changed, 98 insertions, 116 deletions
diff --git a/lldb/source/Commands/CommandObjectArgs.cpp b/lldb/source/Commands/CommandObjectArgs.cpp
index c0f9454b4ba..dfbbe7969b6 100644
--- a/lldb/source/Commands/CommandObjectArgs.cpp
+++ b/lldb/source/Commands/CommandObjectArgs.cpp
@@ -58,7 +58,7 @@ CommandObjectArgs::CommandOptions::SetOptionValue (uint32_t option_idx, const ch
switch (short_option)
{
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index b3eec693aa4..34cfc782699 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -154,7 +154,7 @@ CommandObjectBreakpointSet::CommandOptions::SetOptionValue (uint32_t option_idx,
m_load_addr = Args::StringToUInt64(option_arg, LLDB_INVALID_ADDRESS, 16);
if (m_load_addr == LLDB_INVALID_ADDRESS)
- error.SetErrorStringWithFormat ("Invalid address string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid address string '%s'", option_arg);
break;
case 'c':
@@ -211,14 +211,14 @@ CommandObjectBreakpointSet::CommandOptions::SetOptionValue (uint32_t option_idx,
{
m_ignore_count = Args::StringToUInt32(option_arg, UINT32_MAX, 0);
if (m_ignore_count == UINT32_MAX)
- error.SetErrorStringWithFormat ("Invalid ignore count '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid ignore count '%s'", option_arg);
}
break;
case 't' :
{
m_thread_id = Args::StringToUInt64(option_arg, LLDB_INVALID_THREAD_ID, 0);
if (m_thread_id == LLDB_INVALID_THREAD_ID)
- error.SetErrorStringWithFormat ("Invalid thread id string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid thread id string '%s'", option_arg);
}
break;
case 'T':
@@ -231,12 +231,12 @@ CommandObjectBreakpointSet::CommandOptions::SetOptionValue (uint32_t option_idx,
{
m_thread_index = Args::StringToUInt32(option_arg, UINT32_MAX, 0);
if (m_thread_id == UINT32_MAX)
- error.SetErrorStringWithFormat ("Invalid thread index string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid thread index string '%s'", option_arg);
}
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -689,7 +689,7 @@ CommandObjectBreakpointList::CommandOptions::SetOptionValue (uint32_t option_idx
m_internal = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1057,7 +1057,7 @@ CommandObjectBreakpointClear::CommandOptions::SetOptionValue (uint32_t option_id
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1369,7 +1369,7 @@ CommandObjectBreakpointModify::CommandOptions::SetOptionValue (uint32_t option_i
{
m_ignore_count = Args::StringToUInt32(option_arg, UINT32_MAX, 0);
if (m_ignore_count == UINT32_MAX)
- error.SetErrorStringWithFormat ("Invalid ignore count '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid ignore count '%s'", option_arg);
}
break;
case 't' :
@@ -1383,7 +1383,7 @@ CommandObjectBreakpointModify::CommandOptions::SetOptionValue (uint32_t option_i
{
m_thread_id = Args::StringToUInt64(option_arg, LLDB_INVALID_THREAD_ID, 0);
if (m_thread_id == LLDB_INVALID_THREAD_ID)
- error.SetErrorStringWithFormat ("Invalid thread id string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid thread id string '%s'", option_arg);
else
m_thread_id_passed = true;
}
@@ -1414,14 +1414,14 @@ CommandObjectBreakpointModify::CommandOptions::SetOptionValue (uint32_t option_i
{
m_thread_index = Args::StringToUInt32 (option_arg, UINT32_MAX, 0);
if (m_thread_id == UINT32_MAX)
- error.SetErrorStringWithFormat ("Invalid thread index string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid thread index string '%s'", option_arg);
else
m_thread_index_passed = true;
}
}
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 942d7ff891c..16c3c01b5be 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -120,7 +120,7 @@ CommandObjectBreakpointCommandAdd::CommandOptions::SetOptionValue
bool success = false;
m_stop_on_error = Args::StringToBoolean(option_arg, false, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for stop-on-error: \"%s\".\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for stop-on-error: \"%s\"", option_arg);
}
break;
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index ba81f28ef2e..cb43f659220 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -62,7 +62,7 @@ private:
case 'c':
m_end_idx = Args::StringToUInt32(option_arg, UINT_MAX, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for count: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for count: %s", option_arg);
if (m_end_idx != 0)
m_end_idx--;
m_start_idx = 0;
@@ -70,15 +70,15 @@ private:
case 'e':
m_end_idx = Args::StringToUInt32(option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for end index: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for end index: %s", option_arg);
break;
case 's':
m_start_idx = Args::StringToUInt32(option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for start index: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for start index: %s", option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -188,15 +188,15 @@ private:
case 'e':
m_stop_on_error = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for stop-on-error: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for stop-on-error: %s", option_arg);
break;
case 'c':
m_stop_on_continue = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for stop-on-continue: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for stop-on-continue: %s", option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -478,7 +478,7 @@ public:
if (!cmd_obj)
{
- result.AppendErrorWithFormat ("Invalid command given to 'alias'. '%s' does not begin with a valid command."
+ result.AppendErrorWithFormat ("invalid command given to 'alias'. '%s' does not begin with a valid command."
" No alias created.", raw_command_string.c_str());
result.SetStatus (eReturnStatusFailed);
return false;
@@ -1008,7 +1008,7 @@ private:
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1325,7 +1325,7 @@ private:
m_funct_name = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index 5c7b4856429..c2d8968981c 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -71,13 +71,13 @@ CommandObjectDisassemble::CommandOptions::SetOptionValue (uint32_t option_idx, c
case 'C':
num_lines_context = Args::StringToUInt32(option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat ("Invalid num context lines string: \"%s\".\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid num context lines string: \"%s\"", option_arg);
break;
case 'c':
num_instructions = Args::StringToUInt32(option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat ("Invalid num of instructions string: \"%s\".\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid num of instructions string: \"%s\"", option_arg);
break;
case 'b':
@@ -90,7 +90,7 @@ CommandObjectDisassemble::CommandOptions::SetOptionValue (uint32_t option_idx, c
start_addr = Args::StringToUInt64(option_arg, LLDB_INVALID_ADDRESS, 16);
if (start_addr == LLDB_INVALID_ADDRESS)
- error.SetErrorStringWithFormat ("Invalid start address string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid start address string '%s'", option_arg);
some_location_specified = true;
break;
case 'e':
@@ -99,7 +99,7 @@ CommandObjectDisassemble::CommandOptions::SetOptionValue (uint32_t option_idx, c
end_addr = Args::StringToUInt64(option_arg, LLDB_INVALID_ADDRESS, 16);
if (end_addr == LLDB_INVALID_ADDRESS)
- error.SetErrorStringWithFormat ("Invalid end address string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid end address string '%s'", option_arg);
break;
some_location_specified = true;
case 'n':
@@ -138,7 +138,7 @@ CommandObjectDisassemble::CommandOptions::SetOptionValue (uint32_t option_idx, c
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index dde97b231e8..29fea1efceb 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -76,7 +76,7 @@ CommandObjectExpression::CommandOptions::SetOptionValue (CommandInterpreter &int
//case 'l':
//if (language.SetLanguageFromCString (option_arg) == false)
//{
- // error.SetErrorStringWithFormat("Invalid language option argument '%s'.\n", option_arg);
+ // error.SetErrorStringWithFormat("invalid language option argument '%s'", option_arg);
//}
//break;
@@ -90,7 +90,7 @@ CommandObjectExpression::CommandOptions::SetOptionValue (CommandInterpreter &int
bool result;
result = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid dynamic value setting: \"%s\".\n", option_arg);
+ error.SetErrorStringWithFormat("invalid dynamic value setting: \"%s\"", option_arg);
else
{
if (result)
@@ -106,11 +106,11 @@ CommandObjectExpression::CommandOptions::SetOptionValue (CommandInterpreter &int
bool success;
unwind_on_error = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Could not convert \"%s\" to a boolean value.", option_arg);
+ error.SetErrorStringWithFormat("could not convert \"%s\" to a boolean value.", option_arg);
break;
}
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index c7528124fe0..36f785a6aea 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -127,11 +127,11 @@ public:
case 'r':
relative_frame_offset = Args::StringToSInt32 (option_arg, INT32_MIN, 0, &success);
if (!success)
- error.SetErrorStringWithFormat ("invalid frame offset argument '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid frame offset argument '%s'", option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("invalid short option character '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectHelp.h b/lldb/source/Commands/CommandObjectHelp.h
index c0890489fa7..ff6bd55e8d7 100644
--- a/lldb/source/Commands/CommandObjectHelp.h
+++ b/lldb/source/Commands/CommandObjectHelp.h
@@ -72,7 +72,7 @@ public:
m_show_user_defined = false;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp
index 7dcfabc6617..8a1688e7052 100644
--- a/lldb/source/Commands/CommandObjectLog.cpp
+++ b/lldb/source/Commands/CommandObjectLog.cpp
@@ -210,7 +210,7 @@ public:
case 'p': log_options |= LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD;break;
case 'n': log_options |= LLDB_LOG_OPTION_PREPEND_THREAD_NAME; break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 3336bafec29..cf9ecb01aab 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -84,7 +84,7 @@ public:
case 'l':
error = m_num_per_line.SetValueFromCString (option_arg);
if (m_num_per_line.GetCurrentValue() == 0)
- error.SetErrorStringWithFormat("Invalid value for --num-per-line option '%s'. Must be positive integer value.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for --num-per-line option '%s'", option_arg);
break;
case 'b':
@@ -96,7 +96,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
return error;
@@ -116,28 +116,10 @@ public:
Error error;
OptionValueUInt64 &byte_size_value = format_options.GetByteSizeValue();
OptionValueUInt64 &count_value = format_options.GetCountValue();
- bool byte_size_option_set = byte_size_value.OptionWasSet();
+ const bool byte_size_option_set = byte_size_value.OptionWasSet();
const bool num_per_line_option_set = m_num_per_line.OptionWasSet();
const bool count_option_set = format_options.GetCountValue().OptionWasSet();
- uint32_t format_byte_size = byte_size_value.GetCurrentValue();
- if (byte_size_option_set)
- {
- if (format_byte_size > 0)
- {
- error.SetErrorString("can't specify the byte size in both the '--size <num>' option and the '--format [<byte-size>]<format-char>' options.");
- return error;
- }
- }
- else
- {
- if (format_byte_size != 0)
- {
- byte_size_option_set = true;
- byte_size_value = format_byte_size;
- }
- }
-
switch (format_options.GetFormat())
{
default:
@@ -181,7 +163,7 @@ public:
case eFormatBytes:
case eFormatBytesWithASCII:
- if (byte_size_value.OptionWasSet())
+ if (byte_size_option_set)
{
if (byte_size_value > 1)
error.SetErrorString ("use --count option to specify an end address to display a number of bytes");
@@ -751,7 +733,7 @@ public:
if (!m_infile.Exists())
{
m_infile.Clear();
- error.SetErrorStringWithFormat("Input file does not exist: '%s'\n", option_arg);
+ error.SetErrorStringWithFormat("input file does not exist: '%s'", option_arg);
}
break;
@@ -761,13 +743,13 @@ public:
m_infile_offset = Args::StringToUInt64(option_arg, 0, 0, &success);
if (!success)
{
- error.SetErrorStringWithFormat("Invalid offset string '%s'\n", option_arg);
+ error.SetErrorStringWithFormat("invalid offset string '%s'", option_arg);
}
}
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
return error;
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 0cea39c8754..615bf3ce7c2 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -71,7 +71,7 @@ public:
in_new_tty = true;
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
@@ -442,7 +442,7 @@ public:
pid = Args::StringToUInt32 (option_arg, LLDB_INVALID_PROCESS_ID, 0, &success);
if (!success || pid == LLDB_INVALID_PROCESS_ID)
{
- error.SetErrorStringWithFormat("Invalid process ID '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid process ID '%s'", option_arg);
}
break;
@@ -459,7 +459,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
return error;
@@ -976,7 +976,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
return error;
@@ -1541,7 +1541,7 @@ public:
pass = option_arg;
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
return error;
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index a699118bb72..f1ef83754ca 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -311,7 +311,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
return error;
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index e43c16a0743..2421af5e882 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -265,7 +265,7 @@ CommandObjectSettingsSet::CommandOptions::SetOptionValue (uint32_t option_idx, c
m_reset = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized options '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized options '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index 204b4b84998..5baf5e6db31 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -57,7 +57,7 @@ class CommandObjectSourceInfo : public CommandObject
case 'l':
start_line = Args::StringToUInt32 (option_arg, 0);
if (start_line == 0)
- error.SetErrorStringWithFormat("Invalid line number: '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid line number: '%s'", option_arg);
break;
case 'f':
@@ -65,7 +65,7 @@ class CommandObjectSourceInfo : public CommandObject
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
@@ -169,13 +169,13 @@ class CommandObjectSourceList : public CommandObject
case 'l':
start_line = Args::StringToUInt32 (option_arg, 0);
if (start_line == 0)
- error.SetErrorStringWithFormat("Invalid line number: '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid line number: '%s'", option_arg);
break;
case 'c':
num_lines = Args::StringToUInt32 (option_arg, 0);
if (num_lines == 0)
- error.SetErrorStringWithFormat("Invalid line count: '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid line count: '%s'", option_arg);
break;
case 'f':
@@ -194,7 +194,7 @@ class CommandObjectSourceList : public CommandObject
show_bp_locs = true;
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index b5c3a4c8c95..89653b7bf0d 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -1880,7 +1880,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
@@ -2644,7 +2644,7 @@ public:
if (!success)
{
Error error;
- error.SetErrorStringWithFormat("Invalid address: \"%s\".", option_arg);
+ error.SetErrorStringWithFormat("invalid address: \"%s\"", option_arg);
}
}
else
@@ -2985,13 +2985,13 @@ public:
m_type = eLookupTypeAddress;
m_addr = Args::StringToUInt64(option_arg, LLDB_INVALID_ADDRESS);
if (m_addr == LLDB_INVALID_ADDRESS)
- error.SetErrorStringWithFormat ("Invalid address string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid address string '%s'", option_arg);
break;
case 'o':
m_offset = Args::StringToUInt64(option_arg, LLDB_INVALID_ADDRESS);
if (m_offset == LLDB_INVALID_ADDRESS)
- error.SetErrorStringWithFormat ("Invalid offset string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid offset string '%s'", option_arg);
break;
case 's':
@@ -3011,9 +3011,9 @@ public:
case 'l':
m_line_number = Args::StringToUInt32(option_arg, UINT32_MAX);
if (m_line_number == UINT32_MAX)
- error.SetErrorStringWithFormat ("Invalid line number string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid line number string '%s'", option_arg);
else if (m_line_number == 0)
- error.SetErrorString ("Zero is an invalid line number.");
+ error.SetErrorString ("zero is an invalid line number");
m_type = eLookupTypeFileLine;
break;
@@ -3434,7 +3434,7 @@ public:
m_line_end = Args::StringToUInt32 (option_arg, UINT_MAX, 0, &success);
if (!success)
{
- error.SetErrorStringWithFormat ("Invalid end line number: \"%s\".", option_arg);
+ error.SetErrorStringWithFormat ("invalid end line number: \"%s\"", option_arg);
break;
}
m_sym_ctx_specified = true;
@@ -3444,7 +3444,7 @@ public:
m_line_start = Args::StringToUInt32 (option_arg, 0, 0, &success);
if (!success)
{
- error.SetErrorStringWithFormat ("Invalid start line number: \"%s\".", option_arg);
+ error.SetErrorStringWithFormat ("invalid start line number: \"%s\"", option_arg);
break;
}
m_sym_ctx_specified = true;
@@ -3468,7 +3468,7 @@ public:
{
m_thread_id = Args::StringToUInt64(option_arg, LLDB_INVALID_THREAD_ID, 0);
if (m_thread_id == LLDB_INVALID_THREAD_ID)
- error.SetErrorStringWithFormat ("Invalid thread id string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid thread id string '%s'", option_arg);
m_thread_specified = true;
}
break;
@@ -3484,7 +3484,7 @@ public:
{
m_thread_index = Args::StringToUInt32(option_arg, UINT32_MAX, 0);
if (m_thread_id == UINT32_MAX)
- error.SetErrorStringWithFormat ("Invalid thread index string '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid thread index string '%s'", option_arg);
m_thread_specified = true;
}
break;
@@ -3493,7 +3493,7 @@ public:
m_one_liner = option_arg;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option %c.", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option %c.", short_option);
break;
}
return error;
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index fde74727332..658222e19d8 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -75,7 +75,7 @@ public:
bool success;
int32_t input_count = Args::StringToSInt32 (option_arg, -1, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid integer value for option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid integer value for option '%c'", short_option);
if (input_count < -1)
m_count = UINT32_MAX;
else
@@ -87,11 +87,11 @@ public:
bool success;
m_start = Args::StringToUInt32 (option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid integer value for option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid integer value for option '%c'", short_option);
}
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
@@ -301,7 +301,7 @@ public:
bool success;
m_avoid_no_debug = Args::StringToBoolean (option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid boolean value for option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid boolean value for option '%c'", short_option);
}
break;
@@ -320,7 +320,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
@@ -426,7 +426,7 @@ public:
uint32_t step_thread_idx = Args::StringToUInt32 (thread_idx_cstr, LLDB_INVALID_INDEX32);
if (step_thread_idx == LLDB_INVALID_INDEX32)
{
- result.AppendErrorWithFormat ("Invalid thread index '%s'.\n", thread_idx_cstr);
+ result.AppendErrorWithFormat ("invalid thread index '%s'.\n", thread_idx_cstr);
result.SetStatus (eReturnStatusFailed);
return false;
}
@@ -789,7 +789,7 @@ public:
m_thread_idx = Args::StringToUInt32 (option_arg, LLDB_INVALID_INDEX32);
if (m_thread_idx == LLDB_INVALID_INDEX32)
{
- error.SetErrorStringWithFormat ("Invalid thread index '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid thread index '%s'", option_arg);
}
}
break;
@@ -798,7 +798,7 @@ public:
m_frame_idx = Args::StringToUInt32 (option_arg, LLDB_INVALID_FRAME_ID);
if (m_frame_idx == LLDB_INVALID_FRAME_ID)
{
- error.SetErrorStringWithFormat ("Invalid frame index '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid frame index '%s'", option_arg);
}
}
break;
@@ -817,7 +817,7 @@ public:
}
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
@@ -922,7 +922,7 @@ public:
line_number = Args::StringToUInt32 (command.GetArgumentAtIndex(0), UINT32_MAX);
if (line_number == UINT32_MAX)
{
- result.AppendErrorWithFormat ("Invalid line number: '%s'.\n", command.GetArgumentAtIndex(0));
+ result.AppendErrorWithFormat ("invalid line number: '%s'.\n", command.GetArgumentAtIndex(0));
result.SetStatus (eReturnStatusFailed);
return false;
}
@@ -1142,7 +1142,7 @@ public:
Thread *new_thread = process->GetThreadList().FindThreadByIndexID(index_id).get();
if (new_thread == NULL)
{
- result.AppendErrorWithFormat ("Invalid thread #%s.\n", command.GetArgumentAtIndex(0));
+ result.AppendErrorWithFormat ("invalid thread #%s.\n", command.GetArgumentAtIndex(0));
result.SetStatus (eReturnStatusFailed);
return false;
}
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 8acd3e0168c..b3e24bb2a90 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -237,7 +237,7 @@ private:
case 'C':
m_cascade = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for cascade: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for cascade: %s", option_arg);
break;
case 'P':
handwrite_python = true;
@@ -259,7 +259,7 @@ private:
m_regex = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -401,7 +401,7 @@ private:
case 'C':
m_cascade = Args::StringToBoolean(option_value, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for cascade: %s.\n", option_value);
+ error.SetErrorStringWithFormat("invalid value for cascade: %s", option_value);
break;
case 'p':
m_skip_pointers = true;
@@ -410,7 +410,7 @@ private:
m_skip_references = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -937,7 +937,7 @@ CommandObjectTypeSummaryAdd::CommandOptions::SetOptionValue (uint32_t option_idx
case 'C':
m_cascade = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for cascade: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for cascade: %s", option_arg);
break;
case 'e':
m_no_children = false;
@@ -978,7 +978,7 @@ CommandObjectTypeSummaryAdd::CommandOptions::SetOptionValue (uint32_t option_idx
m_category = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1469,7 +1469,7 @@ private:
m_category = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1627,7 +1627,7 @@ private:
m_delete_all = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1769,7 +1769,7 @@ class CommandObjectTypeSummaryList : public CommandObject
m_category_regex = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -2290,7 +2290,7 @@ class CommandObjectTypeFilterList : public CommandObject
m_category_regex = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -2500,7 +2500,7 @@ class CommandObjectTypeSynthList : public CommandObject
m_category_regex = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -2698,7 +2698,7 @@ private:
m_category = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -2860,7 +2860,7 @@ private:
m_category = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -3020,7 +3020,7 @@ private:
m_delete_all = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -3146,7 +3146,7 @@ private:
m_delete_all = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -3642,7 +3642,7 @@ private:
case 'C':
m_cascade = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for cascade: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for cascade: %s", option_arg);
break;
case 'c':
m_expr_paths.push_back(option_arg);
@@ -3661,7 +3661,7 @@ private:
m_regex = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index a6163df24bb..4756e930ecb 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -231,7 +231,7 @@ CommandObjectWatchpointList::CommandOptions::SetOptionValue(uint32_t option_idx,
m_level = lldb::eDescriptionLevelVerbose;
break;
default:
- error.SetErrorStringWithFormat("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
break;
}
@@ -601,11 +601,11 @@ CommandObjectWatchpointIgnore::CommandOptions::SetOptionValue (uint32_t option_i
{
m_ignore_count = Args::StringToUInt32(option_arg, UINT32_MAX, 0);
if (m_ignore_count == UINT32_MAX)
- error.SetErrorStringWithFormat ("Invalid ignore count '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat ("invalid ignore count '%s'", option_arg);
}
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -741,7 +741,7 @@ CommandObjectWatchpointModify::CommandOptions::SetOptionValue (uint32_t option_i
m_condition_passed = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
OpenPOWER on IntegriCloud