Remove the functionality of using 'frame variable -w' to set a watchpoint now that 'watchpoint set variable/expression'
is working. Also update the relevant test cases.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150514 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/functionalities/completion/TestCompletion.py b/test/functionalities/completion/TestCompletion.py
index 17d5b41..782eba3 100644
--- a/test/functionalities/completion/TestCompletion.py
+++ b/test/functionalities/completion/TestCompletion.py
@@ -18,13 +18,13 @@
system(["/bin/sh", "-c", "rm -f child_send.txt"])
system(["/bin/sh", "-c", "rm -f child_read.txt"])
- def test_frame_variable_dash_w(self):
- """Test that 'frame variable -w' completes to 'frame variable -w '."""
- self.complete_from_to('frame variable -w', 'frame variable -w ')
+ def test_watchpoint_set_variable_dash_w(self):
+ """Test that 'watchpoint set variable -w' completes to 'watchpoint set variable -w '."""
+ self.complete_from_to('watchpoint set variable -w', 'watchpoint set variable -w ')
- def test_frame_variable_dash_w_space(self):
- """Test that 'frame variable -w ' completes to ['Available completions:', 'read', 'write', 'read_write']."""
- self.complete_from_to('frame variable -w ', ['Available completions:', 'read', 'write', 'read_write'])
+ def test_watchpoint_set_variable_dash_w_space(self):
+ """Test that 'watchpoint set variable -w ' completes to ['Available completions:', 'read', 'write', 'read_write']."""
+ self.complete_from_to('watchpoint set variable -w ', ['Available completions:', 'read', 'write', 'read_write'])
def test_watchpoint_set_ex(self):
"""Test that 'watchpoint set ex' completes to 'watchpoint set expression '."""
diff --git a/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py b/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
index 8ad797b..55e3502 100644
--- a/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
+++ b/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
@@ -60,7 +60,7 @@
# 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("frame variable -w write -x 1 -g g_char_ptr", WATCHPOINT_CREATED,
+ self.expect("watchpoint set expression -w write -x 1 -- g_char_ptr", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 1', 'type = w'])
self.runCmd("expr unsigned val = *g_char_ptr; val")
self.expect(self.res.GetOutput().splitlines()[0], exe=False,
diff --git a/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
index 1c0b90e..c937e4c 100644
--- a/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
+++ b/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
@@ -11,30 +11,17 @@
mydir = os.path.join("functionalities", "watchpoint", "hello_watchpoint")
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
- def test_hello_watchpoint_with_dsym_using_frame_var(self):
- """Test a simple sequence of watchpoint creation and watchpoint hit."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_watchpoint()
-
- def test_hello_watchpoint_with_dwarf_using_frame_var(self):
- """Test a simple sequence of watchpoint creation and watchpoint hit."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_watchpoint()
-
def test_hello_watchpoint_with_dsym_using_watchpoint_set(self):
"""Test a simple sequence of watchpoint creation and watchpoint hit."""
self.buildDsym(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
- self.hello_watchpoint(use_frame_var=False)
+ self.hello_watchpoint()
def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self):
"""Test a simple sequence of watchpoint creation and watchpoint hit."""
self.buildDwarf(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
- self.hello_watchpoint(use_frame_var=False)
+ self.hello_watchpoint()
def setUp(self):
# Call super's setUp().
@@ -49,7 +36,7 @@
self.exe_name = self.testMethodName
self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
- def hello_watchpoint(self, use_frame_var=True):
+ def hello_watchpoint(self):
"""Test a simple sequence of watchpoint creation and watchpoint hit."""
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -70,14 +57,9 @@
# Now let's set a write-type watchpoint for 'global'.
# There should be only one watchpoint hit (see main.c).
- if use_frame_var:
- self.expect("frame variable -w write -g -L global", WATCHPOINT_CREATED,
- substrs = ['Watchpoint created', 'size = 4', 'type = w',
- '%s:%d' % (self.source, self.decl)])
- else:
- self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
- substrs = ['Watchpoint created', 'size = 4', 'type = w',
- '%s:%d' % (self.source, self.decl)])
+ self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
+ substrs = ['Watchpoint created', 'size = 4', 'type = w',
+ '%s:%d' % (self.source, self.decl)])
# Use the '-v' option to do verbose listing of the watchpoint.
# The hit count should be 0 initially.
diff --git a/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py b/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
index d8bc418..5733e85 100644
--- a/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
+++ b/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
@@ -64,7 +64,7 @@
# 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
# writing to the variable.
- self.expect("frame variable -w write -g g_val", WATCHPOINT_CREATED,
+ self.expect("watchpoint set variable -w write g_val", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = w'])
# Use the '-v' option to do verbose listing of the watchpoint.
diff --git a/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py b/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
index 2dcbe65..bdb0207 100644
--- a/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
+++ b/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
@@ -111,7 +111,7 @@
# Now let's set a read_write-type watchpoint for 'global'.
# There should be two watchpoint hits (see main.c).
- self.expect("frame variable -w read_write -g -L global", WATCHPOINT_CREATED,
+ self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = rw',
'%s:%d' % (self.source, self.decl)])
@@ -167,7 +167,7 @@
# Now let's set a read_write-type watchpoint for 'global'.
# There should be two watchpoint hits (see main.c).
- self.expect("frame variable -w read_write -g -L global", WATCHPOINT_CREATED,
+ self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = rw',
'%s:%d' % (self.source, self.decl)])
@@ -209,7 +209,7 @@
# Now let's set a read_write-type watchpoint for 'global'.
# There should be two watchpoint hits (see main.c).
- self.expect("frame variable -w read_write -g -L global", WATCHPOINT_CREATED,
+ self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = rw',
'%s:%d' % (self.source, self.decl)])
@@ -255,7 +255,7 @@
# Now let's set a read_write-type watchpoint for 'global'.
# There should be two watchpoint hits (see main.c).
- self.expect("frame variable -w read_write -g -L global", WATCHPOINT_CREATED,
+ self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = rw',
'%s:%d' % (self.source, self.decl)])
@@ -314,7 +314,7 @@
# Now let's set a read_write-type watchpoint for 'global'.
# There should be two watchpoint hits (see main.c).
- self.expect("frame variable -w read_write -g -L global", WATCHPOINT_CREATED,
+ self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = rw',
'%s:%d' % (self.source, self.decl)])
diff --git a/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
index 4f7168a..accceb9 100644
--- a/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
+++ b/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
@@ -58,7 +58,7 @@
# Now let's set a write-type watchpoint for 'global'.
# With a condition of 'global==5'.
- self.expect("frame variable -w write -g -L global", WATCHPOINT_CREATED,
+ self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = w',
'%s:%d' % (self.source, self.decl)])