[Lldb-commits] [lldb] r142999 - in /lldb/trunk: include/lldb/ include/lldb/Interpreter/ source/API/ source/Commands/ source/Core/ source/Host/common/ source/Interpreter/ source/Plugins/Platform/gdb-server/ source/Plugins/Process/gdb-remote/ source/Target/
Greg Clayton
gclayton at apple.com
Tue Oct 25 17:56:27 PDT 2011
Author: gclayton
Date: Tue Oct 25 19:56:27 2011
New Revision: 142999
URL: http://llvm.org/viewvc/llvm-project?rev=142999&view=rev
Log:
Cleaned up many error codes. For any who is filling in error strings into
lldb_private::Error objects the rules are:
- short strings that don't start with a capitol letter unless the name is a
class or anything else that is always capitolized
- no trailing newline character
- should be one line if possible
Implemented a first pass at adding "--gdb-format" support to anything that
accepts format with optional size/count.
Modified:
lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h
lldb/trunk/include/lldb/lldb-enumerations.h
lldb/trunk/source/API/SBThread.cpp
lldb/trunk/source/Commands/CommandObjectArgs.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectFrame.cpp
lldb/trunk/source/Commands/CommandObjectHelp.h
lldb/trunk/source/Commands/CommandObjectLog.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectRegister.cpp
lldb/trunk/source/Commands/CommandObjectSettings.cpp
lldb/trunk/source/Commands/CommandObjectSource.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
lldb/trunk/source/Core/Debugger.cpp
lldb/trunk/source/Core/ModuleList.cpp
lldb/trunk/source/Core/RegisterValue.cpp
lldb/trunk/source/Core/Scalar.cpp
lldb/trunk/source/Core/UserSettingsController.cpp
lldb/trunk/source/Core/ValueObjectChild.cpp
lldb/trunk/source/Host/common/File.cpp
lldb/trunk/source/Interpreter/Args.cpp
lldb/trunk/source/Interpreter/CommandObject.cpp
lldb/trunk/source/Interpreter/NamedOptionValue.cpp
lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp
lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp
lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp
lldb/trunk/source/Interpreter/OptionGroupUUID.cpp
lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp
lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/Target.cpp
lldb/trunk/source/Target/TargetList.cpp
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h Tue Oct 25 19:56:27 2011
@@ -97,9 +97,17 @@
protected:
+ lldb::Format
+ SetFormatUsingGDBFormatLetter (char format_letter);
+
+ uint32_t
+ SetByteSizeUsingGDBSizeLetter (char size_letter);
+
OptionValueFormat m_format;
OptionValueUInt64 m_byte_size;
OptionValueUInt64 m_count;
+ char m_prev_gdb_format;
+ char m_prev_gdb_size;
};
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Tue Oct 25 19:56:27 2011
@@ -361,6 +361,7 @@
eArgTypeFrameIndex,
eArgTypeFullName,
eArgTypeFunctionName,
+ eArgTypeGDBFormat,
eArgTypeIndex,
eArgTypeLineNum,
eArgTypeLogCategory,
Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Tue Oct 25 19:56:27 2011
@@ -732,7 +732,7 @@
sb_error.SetErrorStringWithFormat("No line entries for %s:%u", path, line);
}
else
- sb_error.SetErrorString ("Step until target not in current function.\n");
+ sb_error.SetErrorString ("step until target not in current function");
}
else
{
Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Tue Oct 25 19:56:27 2011
@@ -58,7 +58,7 @@
switch (short_option)
{
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Tue Oct 25 19:56:27 2011
@@ -154,7 +154,7 @@
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 @@
{
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 @@
{
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 @@
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 @@
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1369,7 +1369,7 @@
{
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 @@
{
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 @@
{
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;
}
Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Tue Oct 25 19:56:27 2011
@@ -120,7 +120,7 @@
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;
Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Tue Oct 25 19:56:27 2011
@@ -62,7 +62,7 @@
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 @@
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 @@
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 @@
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 @@
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1325,7 +1325,7 @@
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;
}
Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Tue Oct 25 19:56:27 2011
@@ -71,13 +71,13 @@
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 @@
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 @@
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 @@
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Tue Oct 25 19:56:27 2011
@@ -76,7 +76,7 @@
//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 @@
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 @@
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;
}
Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Tue Oct 25 19:56:27 2011
@@ -127,11 +127,11 @@
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;
}
Modified: lldb/trunk/source/Commands/CommandObjectHelp.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.h?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.h (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.h Tue Oct 25 19:56:27 2011
@@ -72,7 +72,7 @@
m_show_user_defined = false;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.cpp Tue Oct 25 19:56:27 2011
@@ -210,7 +210,7 @@
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;
}
Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Tue Oct 25 19:56:27 2011
@@ -84,7 +84,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;
Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Tue Oct 25 19:56:27 2011
@@ -71,7 +71,7 @@
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 @@
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 @@
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 @@
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 @@
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;
Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Tue Oct 25 19:56:27 2011
@@ -311,7 +311,7 @@
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Tue Oct 25 19:56:27 2011
@@ -265,7 +265,7 @@
m_reset = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized options '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized options '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Tue Oct 25 19:56:27 2011
@@ -57,7 +57,7 @@
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 @@
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
@@ -169,13 +169,13 @@
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 @@
show_bp_locs = true;
break;
default:
- error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Tue Oct 25 19:56:27 2011
@@ -1880,7 +1880,7 @@
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 @@
if (!success)
{
Error error;
- error.SetErrorStringWithFormat("Invalid address: \"%s\".", option_arg);
+ error.SetErrorStringWithFormat("invalid address: \"%s\"", option_arg);
}
}
else
@@ -2985,13 +2985,13 @@
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 @@
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 @@
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 @@
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 @@
{
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 @@
{
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 @@
m_one_liner = option_arg;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option %c.", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option %c.", short_option);
break;
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Tue Oct 25 19:56:27 2011
@@ -75,7 +75,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
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 @@
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;
}
Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Tue Oct 25 19:56:27 2011
@@ -237,7 +237,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
m_regex = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Tue Oct 25 19:56:27 2011
@@ -231,7 +231,7 @@
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 @@
{
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 @@
m_condition_passed = true;
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Tue Oct 25 19:56:27 2011
@@ -2160,7 +2160,7 @@
// Verify we have a value string.
if (value == NULL || value[0] == '\0')
{
- err.SetErrorString ("Missing value. Can't set terminal width without a value.\n");
+ err.SetErrorString ("missing value, can't set terminal width without a value");
}
else
{
@@ -2172,10 +2172,10 @@
if (width >= 10 && width <= 1024)
valid = true;
else
- err.SetErrorString ("Invalid term-width value; value must be between 10 and 1024.\n");
+ err.SetErrorString ("invalid term-width value; value must be between 10 and 1024");
}
else
- err.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string.\n", value);
+ err.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string", value);
}
return valid;
Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Tue Oct 25 19:56:27 2011
@@ -866,14 +866,14 @@
if (arch.IsValid())
{
if (uuid_cstr[0])
- error.SetErrorStringWithFormat("'%s' does not contain the %s architecture and UUID %s.\n", path, arch.GetArchitectureName(), uuid_cstr);
+ error.SetErrorStringWithFormat("'%s' does not contain the %s architecture and UUID %s", path, arch.GetArchitectureName(), uuid_cstr);
else
- error.SetErrorStringWithFormat("'%s' does not contain the %s architecture.\n", path, arch.GetArchitectureName());
+ error.SetErrorStringWithFormat("'%s' does not contain the %s architecture.", path, arch.GetArchitectureName());
}
}
else
{
- error.SetErrorStringWithFormat("'%s' does not exist.\n", path);
+ error.SetErrorStringWithFormat("'%s' does not exist", path);
}
return error;
}
@@ -930,9 +930,9 @@
if (file_spec)
{
if (arch.IsValid())
- error.SetErrorStringWithFormat("Unable to open %s architecture in '%s'.\n", arch.GetArchitectureName(), path);
+ error.SetErrorStringWithFormat("unable to open %s architecture in '%s'", arch.GetArchitectureName(), path);
else
- error.SetErrorStringWithFormat("Unable to open '%s'.\n", path);
+ error.SetErrorStringWithFormat("unable to open '%s'", path);
}
else
{
@@ -942,9 +942,9 @@
uuid_cstr[0] = '\0';
if (uuid_cstr[0])
- error.SetErrorStringWithFormat("Cannot locate a module for UUID '%s'.\n", uuid_cstr);
+ error.SetErrorStringWithFormat("cannot locate a module for UUID '%s'", uuid_cstr);
else
- error.SetErrorStringWithFormat("Cannot locate a module.\n");
+ error.SetErrorStringWithFormat("cannot locate a module");
}
}
}
Modified: lldb/trunk/source/Core/RegisterValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RegisterValue.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Core/RegisterValue.cpp (original)
+++ lldb/trunk/source/Core/RegisterValue.cpp Tue Oct 25 19:56:27 2011
@@ -392,18 +392,18 @@
{
uint64_t uval64 = Args::StringToUInt64(value_str, UINT64_MAX, 0, &success);
if (!success)
- error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value", value_str);
else if (!Args::UInt64ValueIsValidForByteSize (uval64, byte_size))
- error.SetErrorStringWithFormat ("Value 0x%llx is too large to fit in a %u byte unsigned integer value.\n", uval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
else
{
if (!SetUInt (uval64, reg_info->byte_size))
- error.SetErrorStringWithFormat ("Unsupported unsigned integer byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %u", byte_size);
}
}
else
{
- error.SetErrorStringWithFormat ("Unsupported unsigned integer byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %u", byte_size);
return error;
}
break;
@@ -413,18 +413,18 @@
{
uint64_t sval64 = Args::StringToSInt64(value_str, INT64_MAX, 0, &success);
if (!success)
- error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value", value_str);
else if (!Args::SInt64ValueIsValidForByteSize (sval64, byte_size))
- error.SetErrorStringWithFormat ("Value 0x%llx is too large to fit in a %u byte signed integer value.\n", sval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte signed integer value", sval64, byte_size);
else
{
if (!SetUInt (sval64, reg_info->byte_size))
- error.SetErrorStringWithFormat ("Unsupported signed integer byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported signed integer byte size: %u", byte_size);
}
}
else
{
- error.SetErrorStringWithFormat ("Unsupported signed integer byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported signed integer byte size: %u", byte_size);
return error;
}
break;
@@ -435,31 +435,31 @@
if (::sscanf (value_str, "%f", &m_data.ieee_float) == 1)
m_type = eTypeFloat;
else
- error.SetErrorStringWithFormat ("'%s' is not a valid float string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid float string value", value_str);
}
else if (byte_size == sizeof (double))
{
if (::sscanf (value_str, "%lf", &m_data.ieee_double) == 1)
m_type = eTypeDouble;
else
- error.SetErrorStringWithFormat ("'%s' is not a valid float string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid float string value", value_str);
}
else if (byte_size == sizeof (long double))
{
if (::sscanf (value_str, "%Lf", &m_data.ieee_long_double) == 1)
m_type = eTypeLongDouble;
else
- error.SetErrorStringWithFormat ("'%s' is not a valid float string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid float string value", value_str);
}
else
{
- error.SetErrorStringWithFormat ("Unsupported float byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported float byte size: %u", byte_size);
return error;
}
break;
case eEncodingVector:
- error.SetErrorString ("Vector encoding unsupported.");
+ error.SetErrorString ("vector encoding unsupported.");
break;
}
if (error.Fail())
Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Tue Oct 25 19:56:27 2011
@@ -1829,9 +1829,9 @@
{
uint64_t uval64 = Args::StringToUInt64(value_str, UINT64_MAX, 0, &success);
if (!success)
- error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value", value_str);
else if (!UIntValueIsValidForSize (uval64, byte_size))
- error.SetErrorStringWithFormat ("Value 0x%llx is too large to fit in a %u byte unsigned integer value.\n", uval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
else
{
m_type = Scalar::GetValueTypeForUnsignedIntegerWithByteSize (byte_size);
@@ -1841,14 +1841,14 @@
case e_ulong: m_data.ulong = uval64; break;
case e_ulonglong: m_data.ulonglong = uval64; break;
default:
- error.SetErrorStringWithFormat ("Unsupported unsigned integer byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %u", byte_size);
break;
}
}
}
else
{
- error.SetErrorStringWithFormat ("Unsupported unsigned integer byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %u", byte_size);
return error;
}
break;
@@ -1858,9 +1858,9 @@
{
uint64_t sval64 = Args::StringToSInt64(value_str, INT64_MAX, 0, &success);
if (!success)
- error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value", value_str);
else if (!SIntValueIsValidForSize (sval64, byte_size))
- error.SetErrorStringWithFormat ("Value 0x%llx is too large to fit in a %u byte signed integer value.\n", sval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte signed integer value", sval64, byte_size);
else
{
m_type = Scalar::GetValueTypeForSignedIntegerWithByteSize (byte_size);
@@ -1870,14 +1870,14 @@
case e_slong: m_data.slong = sval64; break;
case e_slonglong: m_data.slonglong = sval64; break;
default:
- error.SetErrorStringWithFormat ("Unsupported signed integer byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported signed integer byte size: %u", byte_size);
break;
}
}
}
else
{
- error.SetErrorStringWithFormat ("Unsupported signed integer byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported signed integer byte size: %u", byte_size);
return error;
}
break;
@@ -1888,31 +1888,31 @@
if (::sscanf (value_str, "%f", &m_data.flt) == 1)
m_type = e_float;
else
- error.SetErrorStringWithFormat ("'%s' is not a valid float string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid float string value", value_str);
}
else if (byte_size == sizeof (double))
{
if (::sscanf (value_str, "%lf", &m_data.dbl) == 1)
m_type = e_double;
else
- error.SetErrorStringWithFormat ("'%s' is not a valid float string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid float string value", value_str);
}
else if (byte_size == sizeof (long double))
{
if (::sscanf (value_str, "%Lf", &m_data.ldbl) == 1)
m_type = e_long_double;
else
- error.SetErrorStringWithFormat ("'%s' is not a valid float string value.\n", value_str);
+ error.SetErrorStringWithFormat ("'%s' is not a valid float string value", value_str);
}
else
{
- error.SetErrorStringWithFormat ("Unsupported float byte size: %u.\n", byte_size);
+ error.SetErrorStringWithFormat ("unsupported float byte size: %u", byte_size);
return error;
}
break;
case eEncodingVector:
- error.SetErrorString ("Vector encoding unsupported.");
+ error.SetErrorString ("vector encoding unsupported.");
break;
}
if (error.Fail())
Modified: lldb/trunk/source/Core/UserSettingsController.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/UserSettingsController.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Core/UserSettingsController.cpp (original)
+++ lldb/trunk/source/Core/UserSettingsController.cpp Tue Oct 25 19:56:27 2011
@@ -285,7 +285,7 @@
if (num_pieces < 1)
{
- err.SetErrorStringWithFormat ("'%s' is not a valid variable name; cannot assign value.\n", full_dot_name);
+ err.SetErrorStringWithFormat ("'%s' is not a valid variable name; cannot assign value", full_dot_name);
return err;
}
@@ -303,7 +303,7 @@
if (num_pieces == 0)
{
- err.SetErrorString ("No variable name specified; cannot assign value.\n");
+ err.SetErrorString ("no variable name specified, cannot assign value");
return err;
}
else if (num_pieces == 1)
@@ -337,7 +337,7 @@
entry = GetInstanceEntry (const_var_name);
if (entry == NULL)
{
- err.SetErrorStringWithFormat ("Unable to find variable '%s.%s'; cannot assign value.\n",
+ err.SetErrorStringWithFormat ("unable to find variable '%s.%s', cannot assign value",
prefix.GetCString(), const_var_name.GetCString());
return err;
}
@@ -412,7 +412,7 @@
if (names.GetArgumentCount() != 1)
{
- err.SetErrorStringWithFormat ("Invalid variable name format '%s'; cannot assign value.\n",
+ err.SetErrorStringWithFormat ("invalid variable name format '%s', cannot assign value",
full_dot_name);
return err;
}
@@ -424,7 +424,7 @@
if (entry == NULL)
{
- err.SetErrorStringWithFormat ("Unknown instance variable '%s'; cannot assign value.\n",
+ err.SetErrorStringWithFormat ("unknown instance variable '%s', cannot assign value",
const_var_name.GetCString());
return err;
}
@@ -513,7 +513,7 @@
}
if (!found)
{
- err.SetErrorStringWithFormat ("Unable to find variable '%s'; cannot assign value.\n",
+ err.SetErrorStringWithFormat ("unable to find variable '%s', cannot assign value",
full_dot_name);
return err;
}
@@ -522,7 +522,7 @@
}
else
{
- err.SetErrorStringWithFormat ("'%s' is not a valid level name; was expecting '%s'. Cannot assign value.\n",
+ err.SetErrorStringWithFormat ("'%s' is not a valid level name; was expecting '%s', cannot assign value",
prefix.GetCString(), m_settings.level_name.GetCString());
}
@@ -553,7 +553,7 @@
if ((prefix != m_settings.level_name)
&& (m_settings.level_name.GetLength () > 0))
{
- err.SetErrorString ("Invalid variable name");
+ err.SetErrorString ("invalid variable name");
return value;
}
@@ -638,7 +638,7 @@
}
}
else
- err.SetErrorString ("Invalid variable name");
+ err.SetErrorString ("invalid variable name");
}
}
else
@@ -647,7 +647,7 @@
if ((global_entry == NULL)
&& (instance_entry == NULL))
{
- err.SetErrorString ("Invalid variable name");
+ err.SetErrorString ("invalid variable name");
}
else if (global_entry)
{
@@ -1139,7 +1139,7 @@
{
std::string parent_prefix;
usc_sp->BuildParentPrefix (parent_prefix);
- err.SetErrorStringWithFormat ("Cannot find match for '%s.%s'\n", parent_prefix.c_str(),
+ err.SetErrorStringWithFormat ("cannot find match for '%s.%s'", parent_prefix.c_str(),
prefix.GetCString());
return;
}
@@ -1227,7 +1227,7 @@
{
std::string parent_prefix;
usc_sp->BuildParentPrefix (parent_prefix);
- err.SetErrorStringWithFormat ("Cannot find match for '%s.%s'\n", parent_prefix.c_str(), search_name);
+ err.SetErrorStringWithFormat ("cannot find match for '%s.%s'", parent_prefix.c_str(), search_name);
return;
}
}
@@ -1266,7 +1266,7 @@
{
std::string parent_prefix;
usc_sp->BuildParentPrefix (parent_prefix);
- err.SetErrorStringWithFormat ("Cannot find match for '%s.%s'\n", parent_prefix.c_str(), search_name);
+ err.SetErrorStringWithFormat ("cannot find match for '%s.%s'", parent_prefix.c_str(), search_name);
return;
}
}
@@ -1976,7 +1976,7 @@
if (op == eVarSetOperationInvalid)
{
- err.SetErrorString ("Invalid 'settings ' subcommand operation.\n");
+ err.SetErrorString ("invalid 'settings' subcommand operation");
return;
}
@@ -1985,22 +1985,20 @@
case eVarSetOperationInsertBefore:
case eVarSetOperationInsertAfter:
if (var_type != eSetVarTypeArray)
- err.SetErrorString ("Invalid operation: This operation can only be performed on array variables.\n");
+ err.SetErrorString ("invalid operation: this operation can only be performed on array variables");
break;
case eVarSetOperationReplace:
case eVarSetOperationRemove:
if ((var_type != eSetVarTypeArray)
&& (var_type != eSetVarTypeDictionary))
- err.SetErrorString ("Invalid operation: This operation can only be performed on array or dictionary"
- " variables.\n");
+ err.SetErrorString ("invalid operation: this operation can only be performed on array or dictionary variables");
break;
case eVarSetOperationAppend:
case eVarSetOperationClear:
if ((var_type != eSetVarTypeArray)
&& (var_type != eSetVarTypeDictionary)
&& (var_type != eSetVarTypeString))
- err.SetErrorString ("Invalid operation: This operation can only be performed on array, dictionary "
- "or string variables.\n");
+ err.SetErrorString ("invalid operation: this operation can only be performed on array, dictionary or string variables");
break;
default:
break;
@@ -2030,7 +2028,7 @@
else if (op == eVarSetOperationClear)
string_var.clear();
else
- err.SetErrorString ("Unrecognized operation. Cannot update value.\n");
+ err.SetErrorString ("unrecognized operation. Cannot update value");
}
Error
@@ -2053,7 +2051,7 @@
}
else
{
- error.SetErrorString ("Unrecognized operation. Cannot update value.\n");
+ error.SetErrorString ("unrecognized operation, cannot update value");
}
return error;
}
@@ -2118,7 +2116,7 @@
case eVarSetOperationAppend:
case eVarSetOperationInvalid:
default:
- err.SetErrorString ("Invalid operation for Boolean variable. Cannot update value.\n");
+ err.SetErrorString ("invalid operation for Boolean variable, cannot update value");
break;
case eVarSetOperationClear:
@@ -2132,9 +2130,9 @@
if (value_cstr == NULL)
- err.SetErrorStringWithFormat ("invalid boolean string value (NULL)\n");
+ err.SetErrorStringWithFormat ("invalid boolean string value (NULL)");
else if (value_cstr[0] == '\0')
- err.SetErrorStringWithFormat ("invalid boolean string value (empty)\n");
+ err.SetErrorStringWithFormat ("invalid boolean string value (empty)");
else
{
bool new_value = Args::StringToBoolean (value_cstr, false, &success);
@@ -2144,7 +2142,7 @@
bool_value = new_value;
}
else
- err.SetErrorStringWithFormat ("invalid boolean string value: '%s'\n", value_cstr);
+ err.SetErrorStringWithFormat ("invalid boolean string value: '%s'", value_cstr);
}
}
break;
@@ -2214,7 +2212,7 @@
if (!isdigit (index_value[i]))
{
valid_index = false;
- err.SetErrorStringWithFormat ("'%s' is not a valid integer index. Cannot update array value.\n",
+ err.SetErrorStringWithFormat ("'%s' is not a valid integer index, cannot update array value",
index_value);
}
@@ -2225,8 +2223,8 @@
|| index >= array_var.GetArgumentCount())
{
valid_index = false;
- err.SetErrorStringWithFormat ("%d is outside the bounds of the specified array variable. "
- "Cannot update array value.\n", index);
+ err.SetErrorStringWithFormat ("%d is outside the bounds of the specified array variable, "
+ "cannot update array value", index);
}
}
@@ -2270,7 +2268,7 @@
array_var.Clear();
break;
default:
- err.SetErrorString ("Unrecognized operation. Cannot update value.\n");
+ err.SetErrorString ("unrecognized operation, cannot update value");
break;
}
}
@@ -2294,10 +2292,10 @@
if (pos != dictionary.end())
dictionary[key] = new_value;
else
- err.SetErrorStringWithFormat ("'%s' is not an existing key; cannot replace value.\n", index_value);
+ err.SetErrorStringWithFormat ("'%s' is not an existing key; cannot replace value", index_value);
}
else
- err.SetErrorString ("'settings replace' requires a key for dictionary variables. No key supplied.\n");
+ err.SetErrorString ("'settings replace' requires a key for dictionary variables, no key supplied");
break;
case eVarSetOperationRemove:
if (index_value != NULL)
@@ -2306,7 +2304,7 @@
dictionary.erase (key);
}
else
- err.SetErrorString ("'settings remove' requires a key for dictionary variables. No key supplied.\n");
+ err.SetErrorString ("'settings remove' requires a key for dictionary variables, no key supplied");
break;
case eVarSetOperationClear:
dictionary.clear ();
@@ -2346,17 +2344,17 @@
}
else
{
- err.SetErrorString ("Invalid format for dictionary value. Expected one of '[\"<key>\"]=<value>', '[<key>]=<value>', or '<key>=<value>'\n");
+ err.SetErrorString ("invalid format for dictionary value, expected one of '[\"<key>\"]=<value>', '[<key>]=<value>', or '<key>=<value>'");
}
}
}
break;
case eVarSetOperationInsertBefore:
case eVarSetOperationInsertAfter:
- err.SetErrorString ("Specified operation cannot be performed on dictionary variables.\n");
+ err.SetErrorString ("specified operation cannot be performed on dictionary variables");
break;
default:
- err.SetErrorString ("Unrecognized operation.\n");
+ err.SetErrorString ("unrecognized operation");
break;
}
}
Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Tue Oct 25 19:56:27 2011
@@ -179,7 +179,7 @@
// extract the child value from within the parent data?
// Probably...
default:
- m_error.SetErrorString ("Parent has invalid value.");
+ m_error.SetErrorString ("parent has invalid value.");
break;
}
}
@@ -192,7 +192,7 @@
}
else
{
- m_error.SetErrorStringWithFormat("Parent failed to evaluate: %s.\n", parent->GetError().AsCString());
+ m_error.SetErrorStringWithFormat("parent failed to evaluate: %s", parent->GetError().AsCString());
}
}
else
Modified: lldb/trunk/source/Host/common/File.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/File.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/File.cpp (original)
+++ lldb/trunk/source/Host/common/File.cpp Tue Oct 25 19:56:27 2011
@@ -276,7 +276,7 @@
char proc[64];
char path[PATH_MAX];
if (::snprintf(proc, sizeof(proc), "/proc/self/fd/%d", GetDescriptor()) < 0)
- error.SetErrorString ("Cannot resolve file descriptor\n");
+ error.SetErrorString ("cannot resolve file descriptor");
else
{
ssize_t len;
Modified: lldb/trunk/source/Interpreter/Args.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Args.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Args.cpp (original)
+++ lldb/trunk/source/Interpreter/Args.cpp Tue Oct 25 19:56:27 2011
@@ -584,7 +584,7 @@
struct option *long_options = options.GetLongOptions();
if (long_options == NULL)
{
- error.SetErrorStringWithFormat("Invalid long options.\n");
+ error.SetErrorStringWithFormat("invalid long options");
return error;
}
@@ -620,7 +620,7 @@
// Did we get an error?
if (val == '?')
{
- error.SetErrorStringWithFormat("Unknown or ambiguous option.\n");
+ error.SetErrorStringWithFormat("unknown or ambiguous option");
break;
}
// The option auto-set itself
@@ -651,7 +651,7 @@
}
else
{
- error.SetErrorStringWithFormat("Invalid option with value '%i'.\n", val);
+ error.SetErrorStringWithFormat("invalid option with value '%i'", val);
}
if (error.Fail())
break;
@@ -940,7 +940,7 @@
}
else
{
- error.SetErrorStringWithFormat("%s option string.\n", s ? "empty" : "invalid");
+ error.SetErrorStringWithFormat("%s option string", s ? "empty" : "invalid");
}
return error;
}
Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Tue Oct 25 19:56:27 2011
@@ -207,7 +207,7 @@
if (error_cstr)
{
// We got an error string, lets use that
- result.GetErrorStream().PutCString(error_cstr);
+ result.AppendError(error_cstr);
}
else
{
@@ -640,16 +640,47 @@
static const char *
BreakpointIDHelpTextCallback ()
{
- return "Breakpoint ID's consist major and minor numbers; the major number corresponds to the single entity that was created with a 'breakpoint set' command; the minor numbers correspond to all the locations that were actually found/set based on the major breakpoint. A full breakpoint ID might look like 3.14, meaning the 14th location set for the 3rd breakpoint. You can specify all the locations of a breakpoint by just indicating the major breakpoint number. A valid breakpoint id consists either of just the major id number, or the major number, a dot, and the location number (e.g. 3 or 3.2 could both be valid breakpoint ids).";
+ return "Breakpoint ID's consist major and minor numbers; the major number "
+ "corresponds to the single entity that was created with a 'breakpoint set' "
+ "command; the minor numbers correspond to all the locations that were actually "
+ "found/set based on the major breakpoint. A full breakpoint ID might look like "
+ "3.14, meaning the 14th location set for the 3rd breakpoint. You can specify "
+ "all the locations of a breakpoint by just indicating the major breakpoint "
+ "number. A valid breakpoint id consists either of just the major id number, "
+ "or the major number, a dot, and the location number (e.g. 3 or 3.2 could "
+ "both be valid breakpoint ids).";
}
static const char *
BreakpointIDRangeHelpTextCallback ()
{
- return "A 'breakpoint id list' is a manner of specifying multiple breakpoints. This can be done through several mechanisms. The easiest way is to just enter a space-separated list of breakpoint ids. To specify all the breakpoint locations under a major breakpoint, you can use the major breakpoint number followed by '.*', eg. '5.*' means all the locations under breakpoint 5. You can also indicate a range of breakpoints by using <start-bp-id> - <end-bp-id>. The start-bp-id and end-bp-id for a range can be any valid breakpoint ids. It is not legal, however, to specify a range using specific locations that cross major breakpoint numbers. I.e. 3.2 - 3.7 is legal; 2 - 5 is legal; but 3.2 - 4.4 is not legal.";
+ return "A 'breakpoint id list' is a manner of specifying multiple breakpoints. "
+ "This can be done through several mechanisms. The easiest way is to just "
+ "enter a space-separated list of breakpoint ids. To specify all the "
+ "breakpoint locations under a major breakpoint, you can use the major "
+ "breakpoint number followed by '.*', eg. '5.*' means all the locations under "
+ "breakpoint 5. You can also indicate a range of breakpoints by using "
+ "<start-bp-id> - <end-bp-id>. The start-bp-id and end-bp-id for a range can "
+ "be any valid breakpoint ids. It is not legal, however, to specify a range "
+ "using specific locations that cross major breakpoint numbers. I.e. 3.2 - 3.7"
+ " is legal; 2 - 5 is legal; but 3.2 - 4.4 is not legal.";
}
static const char *
+GDBFormatHelpTextCallback ()
+{
+ return "A GDB format consists of a repeat count followed by a format letter "
+ "and a size letter.\n\nFormat letters are o (octal), x (hex), d (decimal), u"
+ " (unsigned decimal), t (binary), f (float), a (address), i (instruction), "
+ "c (char) and s (string), T (OSType), A (floating point values in hex).\n\n"
+ "Size letters are b (byte), h (halfword), w (word), g (giant, 8 bytes).\n\n"
+ "The specified number of objects of the specified size are printed "
+ "according to the format.\n\n"
+ "Defaults for format and size letters are those previously used. Default "
+ "count is 1.";
+}
+
+static const char *
FormatHelpTextCallback ()
{
@@ -803,6 +834,7 @@
{ eArgTypeFrameIndex, "frame-index", CommandCompletions::eNoCompletion, { NULL, false }, "Index into a thread's list of frames." },
{ eArgTypeFullName, "fullname", CommandCompletions::eNoCompletion, { NULL, false }, "Help text goes here." },
{ eArgTypeFunctionName, "function-name", CommandCompletions::eNoCompletion, { NULL, false }, "The name of a function." },
+ { eArgTypeGDBFormat, "gdb-format", CommandCompletions::eNoCompletion, { GDBFormatHelpTextCallback, true }, NULL },
{ eArgTypeIndex, "index", CommandCompletions::eNoCompletion, { NULL, false }, "An index into a list." },
{ eArgTypeLineNum, "linenum", CommandCompletions::eNoCompletion, { NULL, false }, "Line number in a source file." },
{ eArgTypeLogCategory, "log-category", CommandCompletions::eNoCompletion, { NULL, false }, "The name of a category within a log channel, e.g. all (try \"log list\" to see a list of all channels and their categories." },
Modified: lldb/trunk/source/Interpreter/NamedOptionValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/NamedOptionValue.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/NamedOptionValue.cpp (original)
+++ lldb/trunk/source/Interpreter/NamedOptionValue.cpp Tue Oct 25 19:56:27 2011
@@ -189,11 +189,11 @@
else
{
if (value_cstr == NULL)
- error.SetErrorString ("invalid boolean string value: NULL\n");
+ error.SetErrorString ("invalid boolean string value: NULL");
else if (value_cstr[0] == '\0')
- error.SetErrorString ("invalid boolean string value <empty>\n");
+ error.SetErrorString ("invalid boolean string value <empty>");
else
- error.SetErrorStringWithFormat ("invalid boolean string value: '%s'\n", value_cstr);
+ error.SetErrorStringWithFormat ("invalid boolean string value: '%s'", value_cstr);
}
return error;
}
@@ -221,7 +221,7 @@
}
else
{
- error.SetErrorStringWithFormat ("invalid int64_t string value: '%s'\n", value_cstr);
+ error.SetErrorStringWithFormat ("invalid int64_t string value: '%s'", value_cstr);
}
return error;
}
@@ -260,7 +260,7 @@
}
else
{
- error.SetErrorStringWithFormat ("invalid uint64_t string value: '%s'\n", value_cstr);
+ error.SetErrorStringWithFormat ("invalid uint64_t string value: '%s'", value_cstr);
}
return error;
}
@@ -396,7 +396,7 @@
OptionValueArray::SetValueFromCString (const char *value_cstr)
{
Error error;
- error.SetErrorStringWithFormat ("array option values don't yet support being set by string: '%s'\n", value_cstr);
+ error.SetErrorStringWithFormat ("array option values don't yet support being set by string: '%s'", value_cstr);
return error;
}
@@ -419,7 +419,7 @@
OptionValueDictionary::SetValueFromCString (const char *value_cstr)
{
Error error;
- error.SetErrorStringWithFormat ("dictionary option values don't yet support being set by string: '%s'\n", value_cstr);
+ error.SetErrorStringWithFormat ("dictionary option values don't yet support being set by string: '%s'", value_cstr);
return error;
}
Modified: lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp Tue Oct 25 19:56:27 2011
@@ -71,7 +71,7 @@
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupFormat.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupFormat.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupFormat.cpp Tue Oct 25 19:56:27 2011
@@ -23,7 +23,9 @@
uint64_t default_count) :
m_format (default_format, default_format),
m_byte_size (default_byte_size, default_byte_size),
- m_count (default_count, default_count)
+ m_count (default_count, default_count),
+ m_prev_gdb_format('x'),
+ m_prev_gdb_size('w')
{
}
@@ -34,9 +36,12 @@
static OptionDefinition
g_option_table[] =
{
-{ LLDB_OPT_SET_1, false, "format",'f', required_argument, NULL, 0, eArgTypeFormat , "Specify a format to be used for display."},
-{ LLDB_OPT_SET_2, false, "size" ,'s', required_argument, NULL, 0, eArgTypeByteSize, "The size in bytes to use when displaying with the selected format."},
-{ LLDB_OPT_SET_3, false, "count" ,'c', required_argument, NULL, 0, eArgTypeCount , "The number of total items to display."},
+{ LLDB_OPT_SET_1, false, "format" ,'f', required_argument, NULL, 0, eArgTypeFormat , "Specify a format to be used for display."},
+{ LLDB_OPT_SET_1|
+ LLDB_OPT_SET_2|
+ LLDB_OPT_SET_3, false, "gdb-format",'G', required_argument, NULL, 0, eArgTypeGDBFormat, "Specify a format using a GDB format specifier string."},
+{ LLDB_OPT_SET_2, false, "size" ,'s', required_argument, NULL, 0, eArgTypeByteSize , "The size in bytes to use when displaying with the selected format."},
+{ LLDB_OPT_SET_3, false, "count" ,'c', required_argument, NULL, 0, eArgTypeCount , "The number of total items to display."},
};
uint32_t
@@ -45,11 +50,11 @@
if (m_byte_size.GetDefaultValue() < UINT64_MAX)
{
if (m_count.GetDefaultValue() < UINT64_MAX)
- return 3;
+ return 4;
else
- return 2;
+ return 3;
}
- return 1;
+ return 2;
}
const OptionDefinition *
@@ -98,14 +103,159 @@
}
break;
+ case 'G':
+ {
+ char *end = NULL;
+ const char *gdb_format_cstr = option_arg;
+ uint64_t count = 0;
+ if (::isdigit (gdb_format_cstr[0]))
+ {
+ count = strtoull (gdb_format_cstr, &end, 0);
+
+ if (option_arg != end)
+ gdb_format_cstr = end; // We have a valid count, advance the string position
+ else
+ count = 0;
+ }
+
+ Format format = SetFormatUsingGDBFormatLetter (gdb_format_cstr[0]);
+ if (format != eFormatInvalid)
+ ++gdb_format_cstr;
+
+ uint32_t byte_size = SetByteSizeUsingGDBSizeLetter (gdb_format_cstr[0]);
+ if (byte_size == 0)
+ ++gdb_format_cstr;
+
+ // We the first character of the "gdb_format_cstr" is not the
+ // NULL terminator, we didn't consume the entire string and
+ // something is wrong. Also, if none of the format, size or count
+ // was specified correctly, then abort.
+ if (gdb_format_cstr[0] || (format == eFormatInvalid && byte_size == 0 && count == 0))
+ {
+ // Nothing got set correctly
+ error.SetErrorStringWithFormat ("invalid gdb format string '%s'", option_arg);
+ return error;
+ }
+
+ // At least one of the format, size or count was set correctly.
+ // Anything that wasn't set correctly should be set to the
+ // previous default
+ if (format == eFormatInvalid)
+ format = SetFormatUsingGDBFormatLetter (m_prev_gdb_format);
+
+ const bool byte_size_enabled = m_byte_size.GetDefaultValue() < UINT64_MAX;
+ const bool count_enabled = m_count.GetDefaultValue() < UINT64_MAX;
+ if (byte_size_enabled)
+ {
+ // Byte size is enabled
+ if (byte_size == 0)
+ byte_size = SetByteSizeUsingGDBSizeLetter (m_prev_gdb_size);
+ }
+ else
+ {
+ // Byte size is disabled, make sure it wasn't specified
+ if (byte_size > 0)
+ {
+ error.SetErrorString ("this command doesn't support specifying a byte size");
+ return error;
+ }
+ }
+
+ if (count_enabled)
+ {
+ // Count is enabled and was not set, set it to the default
+ if (count == 0)
+ count = m_count.GetDefaultValue();
+ }
+ else
+ {
+ // Count is disabled, make sure it wasn't specified
+ if (count > 0)
+ {
+ error.SetErrorString ("this command doesn't support specifying a count");
+ return error;
+ }
+ }
+
+ m_format.SetCurrentValue (format);
+ m_format.SetOptionWasSet ();
+ if (byte_size_enabled)
+ {
+ m_byte_size.SetCurrentValue (byte_size);
+ m_byte_size.SetOptionWasSet ();
+ }
+ if (count_enabled)
+ {
+ m_count.SetCurrentValue(count);
+ m_count.SetOptionWasSet ();
+ }
+ }
+ break;
+
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
return error;
}
+Format
+OptionGroupFormat::SetFormatUsingGDBFormatLetter (char format_letter)
+{
+ Format format = eFormatInvalid;
+ switch (format_letter)
+ {
+ case 'o': format = eFormatOctal; break;
+ case 'x': format = eFormatHex; break;
+ case 'd': format = eFormatDecimal; break;
+ case 'u': format = eFormatUnsigned; break;
+ case 't': format = eFormatBinary; break;
+ case 'f': format = eFormatFloat; break;
+ case 'a': format = eFormatHex; break; // TODO: add a new format: eFormatAddress
+ case 'i': format = eFormatHex; break; // TODO: add a new format: eFormatInstruction
+ case 'c': format = eFormatChar; break;
+ case 's': format = eFormatCString; break;
+ case 'T': format = eFormatOSType; break;
+ case 'A': format = eFormatHex; break; // TODO: add a new format: eFormatHexFloat
+ default: break;
+ }
+ if (format != eFormatInvalid)
+ m_prev_gdb_format = format_letter;
+ return format;
+}
+
+uint32_t
+OptionGroupFormat::SetByteSizeUsingGDBSizeLetter (char size_letter)
+{
+ uint32_t byte_size = 0;
+ switch (size_letter)
+ {
+ case 'b': // byte
+ byte_size = 1;
+ break;
+
+ case 'h': // halfword
+ byte_size = 2;
+ break;
+
+ case 'w': // word
+ byte_size = 4;
+ break;
+
+ case 'g': // giant
+ byte_size = 8;
+ break;
+
+ default:
+ break;
+ }
+ if (byte_size)
+ m_prev_gdb_size = size_letter;
+ return byte_size;
+}
+
+
void
OptionGroupFormat::OptionParsingStarting (CommandInterpreter &interpreter)
{
Modified: lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp Tue Oct 25 19:56:27 2011
@@ -66,7 +66,7 @@
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp Tue Oct 25 19:56:27 2011
@@ -119,7 +119,7 @@
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
return error;
Modified: lldb/trunk/source/Interpreter/OptionGroupUUID.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupUUID.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupUUID.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupUUID.cpp Tue Oct 25 19:56:27 2011
@@ -62,7 +62,7 @@
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp Tue Oct 25 19:56:27 2011
@@ -88,13 +88,13 @@
case 'D':
max_depth = Args::StringToUInt32 (option_arg, UINT32_MAX, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid max depth '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid max depth '%s'", option_arg);
break;
case 'P':
ptr_depth = Args::StringToUInt32 (option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid pointer depth '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid pointer depth '%s'", option_arg);
break;
case 'Y':
@@ -102,7 +102,7 @@
{
no_summary_depth = Args::StringToUInt32 (option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid pointer depth '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid pointer depth '%s'", option_arg);
}
else
no_summary_depth = 1;
@@ -111,10 +111,10 @@
case 'S':
use_synth = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid synthetic-type '%s'.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid synthetic-type '%s'", option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupVariable.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupVariable.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupVariable.cpp Tue Oct 25 19:56:27 2011
@@ -67,7 +67,7 @@
summary = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp Tue Oct 25 19:56:27 2011
@@ -74,7 +74,7 @@
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option '%c'", short_option);
break;
}
Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Tue Oct 25 19:56:27 2011
@@ -331,7 +331,7 @@
}
else
{
- error.SetErrorStringWithFormat("'A' packet returned an error: %i.\n", arg_packet_err);
+ error.SetErrorStringWithFormat("'A' packet returned an error: %i", arg_packet_err);
}
return error;
}
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Tue Oct 25 19:56:27 2011
@@ -526,7 +526,7 @@
}
else
{
- error.SetErrorStringWithFormat ("Unable to locate " DEBUGSERVER_BASENAME ".\n");
+ error.SetErrorStringWithFormat ("unable to locate " DEBUGSERVER_BASENAME );
}
return error;
}
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Tue Oct 25 19:56:27 2011
@@ -563,7 +563,7 @@
}
else
{
- error.SetErrorStringWithFormat("'A' packet returned an error: %i.\n", arg_packet_err);
+ error.SetErrorStringWithFormat("'A' packet returned an error: %i", arg_packet_err);
}
m_gdb_comm.SetPacketTimeout (old_packet_timeout);
@@ -597,7 +597,7 @@
{
// Set our user ID to an invalid process ID.
SetID(LLDB_INVALID_PROCESS_ID);
- error.SetErrorStringWithFormat("Failed to get object file from '%s' for arch %s.\n",
+ error.SetErrorStringWithFormat("failed to get object file from '%s' for arch %s",
module->GetFileSpec().GetFilename().AsCString(),
module->GetArchitecture().GetArchitectureName());
}
@@ -2166,7 +2166,7 @@
}
else
{
- error.SetErrorStringWithFormat ("Unable to locate " DEBUGSERVER_BASENAME ".\n");
+ error.SetErrorStringWithFormat ("unable to locate " DEBUGSERVER_BASENAME);
}
if (m_debugserver_pid != LLDB_INVALID_PROCESS_ID)
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Oct 25 19:56:27 2011
@@ -420,7 +420,7 @@
break;
default:
- error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option);
+ error.SetErrorStringWithFormat("unrecognized short option character '%c'", short_option);
break;
}
@@ -1481,7 +1481,7 @@
if (bp_opcode_size == 0)
{
- error.SetErrorStringWithFormat ("Process::GetSoftwareBreakpointTrapOpcode() returned zero, unable to get breakpoint trap for address 0x%llx.\n", bp_addr);
+ error.SetErrorStringWithFormat ("Process::GetSoftwareBreakpointTrapOpcode() returned zero, unable to get breakpoint trap for address 0x%llx", bp_addr);
}
else
{
@@ -1512,7 +1512,7 @@
(uint64_t)bp_addr);
}
else
- error.SetErrorString("Failed to verify the breakpoint trap in memory.");
+ error.SetErrorString("failed to verify the breakpoint trap in memory.");
}
else
error.SetErrorString("Unable to read memory to verify breakpoint trap.");
@@ -2161,7 +2161,7 @@
}
else
{
- error.SetErrorStringWithFormat("File doesn't exist: '%s'.\n", local_exec_file_path);
+ error.SetErrorStringWithFormat("file doesn't exist: '%s'", local_exec_file_path);
}
}
return error;
@@ -2272,16 +2272,16 @@
platform_sp->FindProcesses (match_info, process_infos);
if (process_infos.GetSize() > 1)
{
- error.SetErrorStringWithFormat ("More than one process named %s\n", process_name);
+ error.SetErrorStringWithFormat ("more than one process named %s", process_name);
}
else if (process_infos.GetSize() == 0)
{
- error.SetErrorStringWithFormat ("Could not find a process named %s\n", process_name);
+ error.SetErrorStringWithFormat ("could not find a process named %s", process_name);
}
}
else
{
- error.SetErrorString ("Invalid platform");
+ error.SetErrorString ("invalid platform");
}
}
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Tue Oct 25 19:56:27 2011
@@ -1022,12 +1022,12 @@
if (load_addr == LLDB_INVALID_ADDRESS)
{
if (resolved_addr.GetModule() && resolved_addr.GetModule()->GetFileSpec())
- error.SetErrorStringWithFormat("%s[0x%llx] can't be resolved, %s in not currently loaded.\n",
+ error.SetErrorStringWithFormat("%s[0x%llx] can't be resolved, %s in not currently loaded",
resolved_addr.GetModule()->GetFileSpec().GetFilename().AsCString(),
resolved_addr.GetFileAddress(),
resolved_addr.GetModule()->GetFileSpec().GetFilename().AsCString());
else
- error.SetErrorStringWithFormat("0x%llx can't be resolved.\n", resolved_addr.GetFileAddress());
+ error.SetErrorStringWithFormat("0x%llx can't be resolved", resolved_addr.GetFileAddress());
}
else
{
@@ -1037,9 +1037,9 @@
if (error.Success())
{
if (bytes_read == 0)
- error.SetErrorStringWithFormat("Read memory from 0x%llx failed.\n", load_addr);
+ error.SetErrorStringWithFormat("read memory from 0x%llx failed", load_addr);
else
- error.SetErrorStringWithFormat("Only %zu of %zu bytes were read from memory at 0x%llx.\n", bytes_read, dst_len, load_addr);
+ error.SetErrorStringWithFormat("only %zu of %zu bytes were read from memory at 0x%llx", bytes_read, dst_len, load_addr);
}
}
if (bytes_read)
@@ -2115,7 +2115,7 @@
if (!m_expr_prefix_file.GetCurrentValue().Exists())
{
err.SetErrorToGenericError ();
- err.SetErrorStringWithFormat ("%s does not exist.\n", value);
+ err.SetErrorStringWithFormat ("%s does not exist", value);
return;
}
@@ -2123,7 +2123,7 @@
if (!m_expr_prefix_contents_sp && m_expr_prefix_contents_sp->GetByteSize() == 0)
{
- err.SetErrorStringWithFormat ("Couldn't read data from '%s'\n", value);
+ err.SetErrorStringWithFormat ("couldn't read data from '%s'", value);
m_expr_prefix_contents_sp.reset();
}
}
Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=142999&r1=142998&r2=142999&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Tue Oct 25 19:56:27 2011
@@ -79,7 +79,7 @@
arch.SetTriple(triple_cstr, platform_sp.get());
if (!arch.IsValid())
{
- error.SetErrorStringWithFormat("invalid triple '%s'\n", triple_cstr);
+ error.SetErrorStringWithFormat("invalid triple '%s'", triple_cstr);
return error;
}
}
More information about the lldb-commits
mailing list