Lines Matching refs:self
15 def setUp(self): argument
17 TestBase.setUp(self)
19 self.source = 'main.c'
21 self.line = line_number(self.source, '// Set break point at this line.')
22 … self.line2 = line_number(self.source, '// Set 2nd break point for disable_then_enable test case.')
24 self.decl = line_number(self.source, '// Watchpoint variable declaration.')
26 self.exe_name = self.testMethodName
27 self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
31 def test_rw_watchpoint_with_dsym(self): argument
33 self.buildDsym(dictionary=self.d)
34 self.setTearDownCleanup(dictionary=self.d)
35 self.normal_read_write_watchpoint()
39 def test_rw_watchpoint_with_dwarf(self): argument
41 self.buildDwarf(dictionary=self.d)
42 self.setTearDownCleanup(dictionary=self.d)
43 self.normal_read_write_watchpoint()
47 def test_rw_watchpoint_delete_with_dsym(self): argument
49 self.buildDsym(dictionary=self.d)
50 self.setTearDownCleanup(dictionary=self.d)
51 self.delete_read_write_watchpoint()
55 def test_rw_watchpoint_delete_with_dwarf(self): argument
57 self.buildDwarf(dictionary=self.d)
58 self.setTearDownCleanup(dictionary=self.d)
59 self.delete_read_write_watchpoint()
63 def test_rw_watchpoint_set_ignore_count_with_dsym(self): argument
65 self.buildDsym(dictionary=self.d)
66 self.setTearDownCleanup(dictionary=self.d)
67 self.ignore_read_write_watchpoint()
71 def test_rw_watchpoint_set_ignore_count_with_dwarf(self): argument
73 self.buildDwarf(dictionary=self.d)
74 self.setTearDownCleanup(dictionary=self.d)
75 self.ignore_read_write_watchpoint()
79 def test_rw_disable_after_first_stop_with_dsym(self): argument
81 self.buildDsym(dictionary=self.d)
82 self.setTearDownCleanup(dictionary=self.d)
83 self.read_write_watchpoint_disable_after_first_stop()
87 def test_rw_disable_after_first_stop__with_dwarf(self): argument
89 self.buildDwarf(dictionary=self.d)
90 self.setTearDownCleanup(dictionary=self.d)
91 self.read_write_watchpoint_disable_after_first_stop()
95 def test_rw_disable_then_enable_with_dsym(self): argument
97 self.buildDsym(dictionary=self.d)
98 self.setTearDownCleanup(dictionary=self.d)
99 self.read_write_watchpoint_disable_then_enable()
103 def test_rw_disable_then_enable_with_dwarf(self): argument
105 self.buildDwarf(dictionary=self.d)
106 self.setTearDownCleanup(dictionary=self.d)
107 self.read_write_watchpoint_disable_then_enable()
109 def normal_read_write_watchpoint(self): argument
111 exe = os.path.join(os.getcwd(), self.exe_name)
112 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
115 lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
118 self.runCmd("run", RUN_SUCCEEDED)
122 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
128 self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
130 '%s:%d' % (self.source, self.decl)])
134 self.expect("watchpoint list -v",
138 self.runCmd("process continue")
142 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
145 self.runCmd("process continue")
149 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
152 self.runCmd("process continue")
156 self.expect("process status",
161 self.expect("watchpoint list -v",
164 def delete_read_write_watchpoint(self): argument
166 exe = os.path.join(os.getcwd(), self.exe_name)
167 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
170 lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
173 self.runCmd("run", RUN_SUCCEEDED)
177 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
183 self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
185 '%s:%d' % (self.source, self.decl)])
188 self.runCmd("settings set auto-confirm true")
189 self.expect("watchpoint delete",
192 self.runCmd("settings clear auto-confirm")
195 self.runCmd("watchpoint list -v")
197 self.runCmd("process continue")
201 self.expect("process status",
204 def ignore_read_write_watchpoint(self): argument
206 exe = os.path.join(os.getcwd(), self.exe_name)
207 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
210 lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
213 self.runCmd("run", RUN_SUCCEEDED)
217 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
223 self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
225 '%s:%d' % (self.source, self.decl)])
228 self.expect("watchpoint ignore -i 2",
233 self.expect("watchpoint list -v",
236 self.runCmd("process continue")
240 self.expect("process status",
245 self.expect("watchpoint list -v",
248 def read_write_watchpoint_disable_after_first_stop(self): argument
250 exe = os.path.join(os.getcwd(), self.exe_name)
251 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
254 lldbutil.run_break_set_by_file_and_line (self, "main.m")
257 self.runCmd("run", RUN_SUCCEEDED)
261 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
267 self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
269 '%s:%d' % (self.source, self.decl)])
273 self.expect("watchpoint list -v",
277 self.runCmd("process continue")
281 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
284 self.runCmd("process continue")
288 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
291 self.runCmd("process continue")
295 self.expect("process status",
300 self.expect("watchpoint list -v",
303 def delete_read_write_watchpoint(self): argument
305 exe = os.path.join(os.getcwd(), self.exe_name)
306 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
309 lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
312 self.runCmd("run", RUN_SUCCEEDED)
316 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
322 self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
324 '%s:%d' % (self.source, self.decl)])
327 self.runCmd("settings set auto-confirm true")
328 self.expect("watchpoint delete",
331 self.runCmd("settings clear auto-confirm")
334 self.runCmd("watchpoint list -v")
336 self.runCmd("process continue")
340 self.expect("process status",
343 def ignore_read_write_watchpoint(self): argument
345 exe = os.path.join(os.getcwd(), self.exe_name)
346 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
349 lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
352 self.runCmd("run", RUN_SUCCEEDED)
356 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
362 self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
364 '%s:%d' % (self.source, self.decl)])
367 self.expect("watchpoint ignore -i 2",
372 self.expect("watchpoint list -v",
375 self.runCmd("process continue")
379 self.expect("process status",
384 self.expect("watchpoint list -v",
387 def read_write_watchpoint_disable_after_first_stop(self): argument
389 exe = os.path.join(os.getcwd(), self.exe_name)
390 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
393 lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
396 self.runCmd("run", RUN_SUCCEEDED)
400 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
406 self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
408 '%s:%d' % (self.source, self.decl)])
412 self.expect("watchpoint list -v",
415 self.runCmd("process continue")
419 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
424 self.runCmd("watchpoint disable")
426 self.expect("watchpoint list -v",
429 self.runCmd("process continue")
433 self.expect("process status",
438 self.expect("watchpoint list -v",
441 def read_write_watchpoint_disable_then_enable(self): argument
443 exe = os.path.join(os.getcwd(), self.exe_name)
444 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
447 lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
448 lldbutil.run_break_set_by_file_and_line (self, None, self.line2, num_expected_locations=1)
451 self.runCmd("run", RUN_SUCCEEDED)
455 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
461 self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
463 '%s:%d' % (self.source, self.decl)])
467 self.runCmd("watchpoint disable")
471 self.expect("watchpoint list -v",
474 self.runCmd("process continue")
477 self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
482 self.runCmd("watchpoint enable")
484 self.expect("watchpoint list -v",
487 self.runCmd("process continue")
491 self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
494 self.runCmd("process continue")
498 self.expect("process status",
503 self.expect("watchpoint list -v",