[Lldb-commits] [lldb] r184147 - Renaming the "--wipe" option to "command history" to "--clear" (-C) for coherence with the rest of the LLDB command-line interface
Enrico Granata
egranata at apple.com
Mon Jun 17 16:28:27 PDT 2013
Author: enrico
Date: Mon Jun 17 18:28:27 2013
New Revision: 184147
URL: http://llvm.org/viewvc/llvm-project?rev=184147&view=rev
Log:
Renaming the "--wipe" option to "command history" to "--clear" (-C) for coherence with the rest of the LLDB command-line interface
Modified:
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/test/functionalities/command_history/TestCommandHistory.py
Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=184147&r1=184146&r2=184147&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Mon Jun 17 18:28:27 2013
@@ -70,7 +70,7 @@ protected:
m_start_idx(0),
m_stop_idx(0),
m_count(0),
- m_wipe(false)
+ m_clear(false)
{
}
@@ -100,9 +100,9 @@ protected:
case 'e':
error = m_stop_idx.SetValueFromCString(option_arg,eVarSetOperationAssign);
break;
- case 'w':
- m_wipe.SetCurrentValue(true);
- m_wipe.SetOptionWasSet();
+ case 'C':
+ m_clear.SetCurrentValue(true);
+ m_clear.SetOptionWasSet();
break;
default:
error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
@@ -118,7 +118,7 @@ protected:
m_start_idx.Clear();
m_stop_idx.Clear();
m_count.Clear();
- m_wipe.Clear();
+ m_clear.Clear();
}
const OptionDefinition*
@@ -136,13 +136,13 @@ protected:
OptionValueUInt64 m_start_idx;
OptionValueUInt64 m_stop_idx;
OptionValueUInt64 m_count;
- OptionValueBoolean m_wipe;
+ OptionValueBoolean m_clear;
};
bool
DoExecute (Args& command, CommandReturnObject &result)
{
- if (m_options.m_wipe.GetCurrentValue() && m_options.m_wipe.OptionWasSet())
+ if (m_options.m_clear.GetCurrentValue() && m_options.m_clear.OptionWasSet())
{
m_interpreter.GetCommandHistory().Clear();
result.SetStatus(lldb::eReturnStatusSuccessFinishNoResult);
@@ -230,7 +230,7 @@ CommandObjectCommandsHistory::CommandOpt
{ LLDB_OPT_SET_1, false, "count", 'c', required_argument, NULL, 0, eArgTypeUnsignedInteger, "How many history commands to print."},
{ LLDB_OPT_SET_1, false, "start-index", 's', required_argument, NULL, 0, eArgTypeUnsignedInteger, "Index at which to start printing history commands (or end to mean tail mode)."},
{ LLDB_OPT_SET_1, false, "end-index", 'e', required_argument, NULL, 0, eArgTypeUnsignedInteger, "Index at which to stop printing history commands."},
-{ LLDB_OPT_SET_2, false, "wipe", 'w', no_argument, NULL, 0, eArgTypeBoolean, "Clears the current command history."},
+{ LLDB_OPT_SET_2, false, "clear", 'C', no_argument, NULL, 0, eArgTypeBoolean, "Clears the current command history."},
{ 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL }
};
Modified: lldb/trunk/test/functionalities/command_history/TestCommandHistory.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_history/TestCommandHistory.py?rev=184147&r1=184146&r2=184147&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_history/TestCommandHistory.py (original)
+++ lldb/trunk/test/functionalities/command_history/TestCommandHistory.py Mon Jun 17 18:28:27 2013
@@ -13,7 +13,7 @@ class CommandHistoryTestCase(TestBase):
mydir = os.path.join("functionalities", "command_history")
def test_history(self):
- self.runCmd('command history --wipe', inHistory=False)
+ self.runCmd('command history --clear', inHistory=False)
self.runCmd('breakpoint list', check=False, inHistory=True) #0
self.runCmd('register read', check=False, inHistory=True) #1
self.runCmd('apropos hello', check=False, inHistory=True) #2
More information about the lldb-commits
mailing list