Lines Matching refs:self
16 def setUp(self): argument
18 TestBase.setUp(self)
20 self.source = 'main.c'
22 self.line = line_number(
23 self.source, '// Set break point at this line.')
24 self.line2 = line_number(
25 self.source,
28 self.decl = line_number(self.source,
32 self.exe_name = self.testMethodName
33 self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
37 def test_rw_watchpoint(self): argument
39 self.build(dictionary=self.d)
40 self.setTearDownCleanup(dictionary=self.d)
42 exe = self.getBuildArtifact(self.exe_name)
43 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
47 self, None, self.line, num_expected_locations=1)
50 self.runCmd("run", RUN_SUCCEEDED)
54 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
60 self.expect(
68 (self.source,
69 self.decl)])
73 self.expect("watchpoint list -v",
77 self.runCmd("process continue")
81 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
84 self.runCmd("process continue")
88 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
91 self.runCmd("process continue")
95 self.expect("process status",
100 self.expect("watchpoint list -v",
105 def test_rw_watchpoint_delete(self): argument
107 self.build()
108 lldbutil.run_to_line_breakpoint(self, lldb.SBFileSpec(self.source),
109 self.line)
113 self.expect(
121 (self.source,
122 self.decl)])
126 self.runCmd("settings set auto-confirm true")
127 self.expect("watchpoint delete",
130 self.runCmd("settings clear auto-confirm")
132 target = self.dbg.GetSelectedTarget()
133 self.assertTrue(target and not target.GetNumWatchpoints())
137 self.expect(
145 (self.source,
146 self.decl)])
150 self.expect("watchpoint delete --force",
153 self.assertTrue(target and not target.GetNumWatchpoints())
155 self.runCmd("process continue")
159 self.expect("process status",
164 def test_rw_watchpoint_set_ignore_count(self): argument
166 self.build(dictionary=self.d)
167 self.setTearDownCleanup(dictionary=self.d)
169 exe = self.getBuildArtifact(self.exe_name)
170 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
174 self, None, self.line, num_expected_locations=1)
177 self.runCmd("run", RUN_SUCCEEDED)
181 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
187 self.expect(
195 (self.source,
196 self.decl)])
199 self.expect("watchpoint ignore -i 2",
204 self.expect("watchpoint list -v",
207 self.runCmd("process continue")
211 self.expect("process status",
216 self.expect("watchpoint list -v",
221 def test_rw_disable_after_first_stop(self): argument
223 self.build(dictionary=self.d)
224 self.setTearDownCleanup(dictionary=self.d)
226 exe = self.getBuildArtifact(self.exe_name)
227 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
231 self, None, self.line, num_expected_locations=1)
234 self.runCmd("run", RUN_SUCCEEDED)
238 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
244 self.expect(
252 (self.source,
253 self.decl)])
257 self.expect("watchpoint list -v",
260 self.runCmd("process continue")
264 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
269 self.runCmd("watchpoint disable")
271 self.expect("watchpoint list -v",
274 self.runCmd("process continue")
278 self.expect("process status",
283 self.expect("watchpoint list -v",
288 def test_rw_disable_then_enable(self): argument
290 self.build(dictionary=self.d)
291 self.setTearDownCleanup(dictionary=self.d)
293 exe = self.getBuildArtifact(self.exe_name)
294 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
298 self, None, self.line, num_expected_locations=1)
300 self, None, self.line2, num_expected_locations=1)
303 self.runCmd("run", RUN_SUCCEEDED)
307 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
313 self.expect(
321 (self.source,
322 self.decl)])
326 self.runCmd("watchpoint disable")
330 self.expect("watchpoint list -v",
333 self.runCmd("process continue")
336 self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
341 self.runCmd("watchpoint enable")
343 self.expect("watchpoint list -v",
346 self.runCmd("process continue")
350 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
353 self.runCmd("process continue")
357 self.expect("process status",
362 self.expect("watchpoint list -v",