[Lldb-commits] [lldb] r233237 - Changed '-x'/'-xsize' to '-s'/'-size' when specifying
Sean Callanan
scallanan at apple.com
Wed Mar 25 17:42:28 PDT 2015
Author: spyffe
Date: Wed Mar 25 19:42:27 2015
New Revision: 233237
URL: http://llvm.org/viewvc/llvm-project?rev=233237&view=rev
Log:
Changed '-x'/'-xsize' to '-s'/'-size' when specifying
the size of a watchpoint.
<rdar://problem/18184972>
Modified:
lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
Modified: lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp?rev=233237&r1=233236&r2=233237&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp Wed Mar 25 19:42:27 2015
@@ -41,7 +41,7 @@ static OptionDefinition
g_option_table[] =
{
{ LLDB_OPT_SET_1, false, "watch", 'w', OptionParser::eRequiredArgument, nullptr, g_watch_type, 0, eArgTypeWatchType, "Specify the type of watching to perform."},
- { LLDB_OPT_SET_1, false, "xsize", 'x', OptionParser::eRequiredArgument, nullptr, g_watch_size, 0, eArgTypeByteSize, "Number of bytes to use to watch a region."}
+ { LLDB_OPT_SET_1, false, "size", 's', OptionParser::eRequiredArgument, nullptr, g_watch_size, 0, eArgTypeByteSize, "Number of bytes to use to watch a region."}
};
@@ -87,7 +87,7 @@ OptionGroupWatchpoint::SetOptionValue (C
}
break;
}
- case 'x':
+ case 's':
watch_size = (uint32_t) Args::StringToOptionEnum(option_arg, g_option_table[option_idx].enum_values, 0, error);
break;
Modified: lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py?rev=233237&r1=233236&r2=233237&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py Wed Mar 25 19:42:27 2015
@@ -1,5 +1,5 @@
"""
-Test lldb watchpoint that uses '-x size' to watch a pointed location with size.
+Test lldb watchpoint that uses '-s size' to watch a pointed location with size.
"""
import os, time
@@ -16,7 +16,7 @@ class HelloWatchLocationTestCase(TestBas
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test
def test_hello_watchlocation_with_dsym(self):
- """Test watching a location with '-x size' option."""
+ """Test watching a location with '-s size' option."""
self.buildDsym(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
self.hello_watchlocation()
@@ -25,7 +25,7 @@ class HelloWatchLocationTestCase(TestBas
@dwarf_test
@expectedFailureGcc #xfail to get buildbot green, test failed with gcc4.8.2
def test_hello_watchlocation_with_dwarf(self):
- """Test watching a location with '-x size' option."""
+ """Test watching a location with '-s size' option."""
self.buildDwarf(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
self.hello_watchlocation()
@@ -44,7 +44,7 @@ class HelloWatchLocationTestCase(TestBas
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
def hello_watchlocation(self):
- """Test watching a location with '-x size' option."""
+ """Test watching a location with '-s size' option."""
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -64,7 +64,7 @@ class HelloWatchLocationTestCase(TestBas
# The main.cpp, by design, misbehaves by not following the agreed upon
# protocol of using a mutex while accessing the global pool and by not
# incrmenting the global pool by 2.
- self.expect("watchpoint set expression -w write -x 1 -- g_char_ptr", WATCHPOINT_CREATED,
+ self.expect("watchpoint set expression -w write -s 1 -- g_char_ptr", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 1', 'type = w'])
# Get a hold of the watchpoint id just created, it is used later on to
# match the watchpoint id which is expected to be fired.
@@ -78,7 +78,7 @@ class HelloWatchLocationTestCase(TestBas
self.expect(self.res.GetOutput().splitlines()[0], exe=False,
endstr = ' = 0')
- self.runCmd("watchpoint set expression -w write -x 4 -- &threads[0]")
+ self.runCmd("watchpoint set expression -w write -s 4 -- &threads[0]")
# Use the '-v' option to do verbose listing of the watchpoint.
# The hit count should be 0 initially.
Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py?rev=233237&r1=233236&r2=233237&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py Wed Mar 25 19:42:27 2015
@@ -1,5 +1,5 @@
"""
-Test lldb watchpoint that uses 'watchpoint set -w write -x size' to watch a pointed location with size.
+Test lldb watchpoint that uses 'watchpoint set -w write -s size' to watch a pointed location with size.
"""
import os, time
@@ -15,7 +15,7 @@ class WatchLocationUsingWatchpointSetTes
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test
def test_watchlocation_with_dsym_using_watchpoint_set(self):
- """Test watching a location with 'watchpoint set expression -w write -x size' option."""
+ """Test watching a location with 'watchpoint set expression -w write -s size' option."""
self.buildDsym(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
self.watchlocation_using_watchpoint_set()
@@ -24,7 +24,7 @@ class WatchLocationUsingWatchpointSetTes
@dwarf_test
@expectedFailureGcc #xfail to get buildbot green, test failed with gcc4.8.2
def test_watchlocation_with_dwarf_using_watchpoint_set(self):
- """Test watching a location with 'watchpoint set expression -w write -x size' option."""
+ """Test watching a location with 'watchpoint set expression -w write -s size' option."""
self.buildDwarf(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
self.watchlocation_using_watchpoint_set()
@@ -43,7 +43,7 @@ class WatchLocationUsingWatchpointSetTes
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
def watchlocation_using_watchpoint_set(self):
- """Test watching a location with '-x size' option."""
+ """Test watching a location with '-s size' option."""
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -63,7 +63,7 @@ class WatchLocationUsingWatchpointSetTes
# with offset as 7.
# The main.cpp, by design, misbehaves by not following the agreed upon
# protocol of only accessing the allowable index range of [0, 6].
- self.expect("watchpoint set expression -w write -x 1 -- g_char_ptr + 7", WATCHPOINT_CREATED,
+ self.expect("watchpoint set expression -w write -s 1 -- g_char_ptr + 7", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 1', 'type = w'])
self.runCmd("expr unsigned val = g_char_ptr[7]; val")
self.expect(self.res.GetOutput().splitlines()[0], exe=False,
Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py?rev=233237&r1=233236&r2=233237&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py Wed Mar 25 19:42:27 2015
@@ -57,7 +57,7 @@ class WatchpointSetErrorTestCase(TestBas
'variable'])
self.runCmd("watchpoint set variable -w read_write", check=False)
- # 'watchpoint set expression' with '-w' or '-x' specified now needs
+ # 'watchpoint set expression' with '-w' or '-s' specified now needs
# an option terminator and a raw expression after that.
self.expect("watchpoint set expression -w write --", error=True,
startstr = 'error: ')
@@ -67,7 +67,7 @@ class WatchpointSetErrorTestCase(TestBas
startstr = 'error: expression did not evaluate to an address')
# Wrong size parameter is an error.
- self.expect("watchpoint set variable -x -128", error=True,
+ self.expect("watchpoint set variable -s -128", error=True,
substrs = ['invalid enumeration value'])
More information about the lldb-commits
mailing list