Lines Matching refs:self
29 def test_at(self): argument
31 self.complete_from_to('at', 'attach ')
33 def test_de(self): argument
35 self.complete_from_to('de', 'detach ')
37 def test_frame_variable(self): argument
38 self.build()
39 self.main_source = "main.cpp"
40 self.main_source_spec = lldb.SBFileSpec(self.main_source)
42 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
43 '// Break here', self.main_source_spec)
44 self.assertState(process.GetState(), lldb.eStateStopped)
50 self.complete_from_to('frame variable fo',
52 self.complete_from_to('frame variable fooo.',
54 self.complete_from_to('frame variable fooo.dd',
57 self.complete_from_to('frame variable ptr_fooo->',
59 self.complete_from_to('frame variable ptr_fooo->dd',
62 self.complete_from_to('frame variable cont',
64 self.complete_from_to('frame variable container.',
66 self.complete_from_to('frame variable container.Mem',
69 self.complete_from_to('frame variable ptr_cont',
71 self.complete_from_to('frame variable ptr_container->',
73 self.complete_from_to('frame variable ptr_container->Mem',
76 def test_process_attach_dash_dash_con(self): argument
78 self.complete_from_to(
82 def test_process_launch_arch(self): argument
83 self.complete_from_to('process launch --arch ',
87 def test_process_load(self): argument
88 self.build()
89 lldbutil.run_to_source_breakpoint(self, '// Break here', lldb.SBFileSpec("main.cpp"))
90 self.complete_from_to('process load Makef', 'process load Makefile')
93 def test_process_unload(self): argument
96 self.complete_from_to('process unload ',
99 self.build()
100 lldbutil.run_to_source_breakpoint(self, '// Break here', lldb.SBFileSpec("main.cpp"))
102 self.process().LoadImage(lldb.SBFileSpec(self.getBuildArtifact("libshared.so")), err)
103 self.assertSuccess(err)
105 self.complete_from_to('process unload ',
108 self.process().UnloadImage(0)
109 self.complete_from_to('process unload ',
112 def test_process_plugin_completion(self): argument
116 self.complete_from_to('process ' + subcommand + ' mac',
119 def completions_contain_str(self, input, needle): argument
120 interp = self.dbg.GetCommandInterpreter()
128 self.assertTrue(found_needle, "Returned completions: " + "\n".join(match_strings))
132 def test_common_completion_process_pid_and_name(self): argument
136 self.build()
137 server = self.spawnSubprocess(
138 self.getBuildArtifact("a.out"),
141 self.assertIsNotNone(server)
144 self.completions_contain('process attach -p ', [str(pid)])
145 self.completions_contain('platform process attach -p ', [str(pid)])
146 self.completions_contain('platform process info ', [str(pid)])
148 self.completions_contain_str('process attach -n ', "a.out")
149 self.completions_contain_str('platform process attach -n ', "a.out")
151 def test_process_signal(self): argument
153 self.complete_from_to('process signal ',
157 self.build()
158 self.main_source = "main.cpp"
159 self.main_source_spec = lldb.SBFileSpec(self.main_source)
160 lldbutil.run_to_source_breakpoint(self, '// Break here', self.main_source_spec)
162 self.complete_from_to('process signal ',
164 self.complete_from_to('process signal SIGPIP',
166 self.complete_from_to('process signal SIGA',
170 def test_ambiguous_long_opt(self): argument
171 self.completions_match('breakpoint modify --th',
176 def test_disassemble_dash_f(self): argument
177 self.completions_match('disassemble -F ',
182 def test_plugin_load(self): argument
183 self.complete_from_to('plugin load ', [])
185 def test_log_enable(self): argument
186 self.complete_from_to('log enable ll', ['lldb'])
187 self.complete_from_to('log enable dw', ['dwarf'])
188 self.complete_from_to('log enable lldb al', ['all'])
189 self.complete_from_to('log enable lldb sym', ['symbol'])
191 def test_log_enable(self): argument
192 self.complete_from_to('log disable ll', ['lldb'])
193 self.complete_from_to('log disable dw', ['dwarf'])
194 self.complete_from_to('log disable lldb al', ['all'])
195 self.complete_from_to('log disable lldb sym', ['symbol'])
197 def test_log_list(self): argument
198 self.complete_from_to('log list ll', ['lldb'])
199 self.complete_from_to('log list dw', ['dwarf'])
200 self.complete_from_to('log list ll', ['lldb'])
201 self.complete_from_to('log list lldb dwa', ['dwarf'])
203 def test_quoted_command(self): argument
204 self.complete_from_to('"set',
207 def test_quoted_arg_with_quoted_command(self): argument
208 self.complete_from_to('"settings" "repl',
211 def test_quoted_arg_without_quoted_command(self): argument
212 self.complete_from_to('settings "repl',
215 def test_single_quote_command(self): argument
216 self.complete_from_to("'set",
219 def test_terminated_quote_command(self): argument
222 self.complete_from_to("'settings'", [])
224 def test_process_launch_arch_arm(self): argument
225 self.complete_from_to('process launch --arch arm',
228 def test_target_symbols_add_shlib(self): argument
230 self.complete_from_to('target symbols add --shlib ', [])
232 def test_log_file(self): argument
234 src_dir = self.getSourceDir() + '/'
235 self.complete_from_to('log enable lldb expr -f ' + src_dir,
238 def test_log_dir(self): argument
241 self.complete_from_to('log enable lldb expr -f ' + src_dir,
245 def test_infinite_loop_while_completing(self): argument
247 self.complete_from_to('process print hello\\', 'process print hello\\',
250 def test_watchpoint_co(self): argument
252 self.complete_from_to('watchpoint co', 'watchpoint command ')
254 def test_watchpoint_command_space(self): argument
256 self.complete_from_to(
260 def test_watchpoint_command_a(self): argument
262 self.complete_from_to(
266 def test_watchpoint_set_ex(self): argument
268 self.complete_from_to(
272 def test_watchpoint_set_var(self): argument
274 self.complete_from_to('watchpoint set var', 'watchpoint set variable ')
276 def test_watchpoint_set_variable_foo(self): argument
277 self.build()
278 lldbutil.run_to_source_breakpoint(self, '// Break here', lldb.SBFileSpec("main.cpp"))
279 self.complete_from_to('watchpoint set variable fo', 'watchpoint set variable fooo')
281 self.complete_from_to('watchpoint set variable fooo ', 'watchpoint set variable fooo ')
283 def test_help_fi(self): argument
285 self.complete_from_to(
289 def test_help_watchpoint_s(self): argument
291 self.complete_from_to('help watchpoint s', 'help watchpoint set ')
295 def test_common_complete_watchpoint_ids(self): argument
300 self.complete_from_to('watchpoint ' + subcommand + ' ',
304 self.build()
305 lldbutil.run_to_source_breakpoint(self, '// Break here', lldb.SBFileSpec("main.cpp"))
307 self.runCmd('watchpoint set variable ptr_fooo')
309 self.complete_from_to('watchpoint ' + subcommand + ' ', ['1'])
311 def test_settings_append_target_er(self): argument
313 self.complete_from_to(
317 def test_settings_insert_after_target_en(self): argument
319 self.complete_from_to(
323 def test_settings_insert_before_target_en(self): argument
325 self.complete_from_to(
329 def test_settings_replace_target_ru(self): argument
331 self.complete_from_to(
335 def test_settings_show_term(self): argument
336 self.complete_from_to(
340 def test_settings_list_term(self): argument
341 self.complete_from_to(
345 def test_settings_remove_term(self): argument
346 self.complete_from_to(
350 def test_settings_s(self): argument
352 self.complete_from_to(
356 def test_settings_set_th(self): argument
358 self.complete_from_to('settings set thread-f', 'settings set thread-format')
360 def test_settings_s_dash(self): argument
362 self.complete_from_to('settings set --g', 'settings set --global')
364 def test_settings_clear_th(self): argument
366 self.complete_from_to(
370 def test_settings_set_ta(self): argument
372 self.complete_from_to(
376 def test_settings_set_target_exec(self): argument
378 self.complete_from_to(
382 def test_settings_set_target_pr(self): argument
385 self.complete_from_to('settings set target.pr',
389 def test_settings_set_target_process(self): argument
391 self.complete_from_to(
395 def test_settings_set_target_process_dot(self): argument
397 self.complete_from_to(
401 def test_settings_set_target_process_thread_dot(self): argument
404 self.complete_from_to('settings set target.process.thread.',
408 def test_thread_plan_discard(self): argument
409 self.build()
410 (_, _, thread, _) = lldbutil.run_to_source_breakpoint(self,
412 self.assertTrue(thread)
413 self.complete_from_to('thread plan discard ', 'thread plan discard ')
415 source_path = os.path.join(self.getSourceDir(), "thread_plan_script.py")
416 self.runCmd("command script import '%s'"%(source_path))
417 self.runCmd("thread step-scripted -C thread_plan_script.PushPlanStack")
418 self.complete_from_to('thread plan discard ', 'thread plan discard 1')
419 self.runCmd('thread plan discard 1')
421 def test_target_space(self): argument
424 self.complete_from_to('target ',
433 def test_target_modules_dump_line_table(self): argument
435 self.build()
436 self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
437 self.complete_from_to('target modules dump line-table main.cp',
440 def test_target_modules_load_aout(self): argument
442 self.build()
443 self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
444 self.complete_from_to('target modules load a.ou',
447 def test_target_modules_search_paths_insert(self): argument
449 …self.complete_from_to("target modules search-paths insert ", "target modules search-paths insert ")
450 self.build()
451 target = self.dbg.CreateTarget(self.getBuildArtifact('a.out'))
452 self.assertTrue(target, VALID_TARGET)
453 …self.complete_from_to("target modules search-paths insert ", "target modules search-paths insert ")
454 self.runCmd("target modules search-paths add a b")
455 …self.complete_from_to("target modules search-paths insert ", "target modules search-paths insert 0…
457 …self.complete_from_to("target modules search-paths insert 0 ", "target modules search-paths insert…
459 def test_target_create_dash_co(self): argument
461 self.complete_from_to('target create --co', 'target create --core ')
463 def test_target_va(self): argument
465 self.complete_from_to('target va', 'target variable ')
467 def test_common_completion_thread_index(self): argument
473 self.complete_from_to('thread ' + subcommand + ' ',
476 self.build()
477 lldbutil.run_to_source_breakpoint(self, '// Break here', lldb.SBFileSpec("main.cpp"))
481 self.complete_from_to('thread ' + subcommand + ' ', ['1'])
483 def test_common_completion_type_category_name(self): argument
486 self.complete_from_to('type category ' + subcommand + ' ', ['default'])
487 self.complete_from_to('type filter add -w ', ['default'])
489 def test_command_argument_completion(self): argument
491 self.complete_from_to("watchpoint set variable -", ["-w", "-s"])
492 self.complete_from_to('watchpoint set variable -w', 'watchpoint set variable -w ')
493 self.complete_from_to("watchpoint set variable --", ["--watch", "--size"])
494 self.complete_from_to("watchpoint set variable --w", "watchpoint set variable --watch")
495 self.complete_from_to('watchpoint set variable -w ', ['read', 'write', 'read_write'])
496 self.complete_from_to("watchpoint set variable --watch ", ["read", "write", "read_write"])
497 …self.complete_from_to("watchpoint set variable --watch w", "watchpoint set variable --watch write")
498 … self.complete_from_to('watchpoint set variable -w read_', 'watchpoint set variable -w read_write')
501 self.complete_from_to("watchpoint set variable foo -", ["-w", "-s"])
502 self.complete_from_to('watchpoint set variable foo -w', 'watchpoint set variable foo -w ')
503 self.complete_from_to("watchpoint set variable foo --", ["--watch", "--size"])
504 … self.complete_from_to("watchpoint set variable foo --w", "watchpoint set variable foo --watch")
505 self.complete_from_to('watchpoint set variable foo -w ', ['read', 'write', 'read_write'])
506 … self.complete_from_to("watchpoint set variable foo --watch ", ["read", "write", "read_write"])
507 …self.complete_from_to("watchpoint set variable foo --watch w", "watchpoint set variable foo --watc…
508 …self.complete_from_to('watchpoint set variable foo -w read_', 'watchpoint set variable foo -w read…
510 def test_command_script_delete(self): argument
511 self.runCmd("command script add -h test_desc -f none -s current usercmd1")
512 self.check_completion_with_desc('command script delete ', [['usercmd1', '']])
514 def test_command_delete(self): argument
515 self.runCmd(r"command regex test_command s/^$/finish/ 's/([0-9]+)/frame select %1/'")
516 self.complete_from_to('command delete test_c', 'command delete test_command')
518 def test_command_unalias(self): argument
519 self.complete_from_to('command unalias ima', 'command unalias image')
521 def test_completion_description_commands(self): argument
523 self.check_completion_with_desc("", [
528 self.check_completion_with_desc("pl", [
534 self.check_completion_with_desc("comman", [])
535 self.check_completion_with_desc("non-existent-command", [])
537 def test_completion_description_command_options(self): argument
540 self.check_completion_with_desc("breakpoint set -", [
546 self.check_completion_with_desc("breakpoint set --", [
552 self.check_completion_with_desc("breakpoint set --on-", [
558 self.check_completion_with_desc("breakpoint set --Z", [
561 def test_common_completion_frame_index(self): argument
562 self.build()
563 lldbutil.run_to_source_breakpoint(self, '// Break here', lldb.SBFileSpec("main.cpp"))
565 self.complete_from_to('frame select ', ['0'])
566 self.complete_from_to('thread backtrace -s ', ['0'])
568 def test_frame_recognizer_delete(self): argument
569 self.runCmd("frame recognizer add -l py_class -s module_name -n recognizer_name")
570 …self.check_completion_with_desc('frame recognizer delete ', [['0', 'py_class, module module_name, …
572 def test_platform_install_local_file(self): argument
573 self.complete_from_to('platform target-install main.cp', 'platform target-install main.cpp')
576 def test_symbol_name(self): argument
577 self.build()
578 self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
579 self.complete_from_to('breakpoint set -n Fo',
584 self.complete_from_to('breakpoint set -n Qu', '')
586 def test_completion_type_formatter_delete(self): argument
587 self.runCmd('type filter add --child a Aoo')
588 self.complete_from_to('type filter delete ', ['Aoo'])
589 self.runCmd('type filter add --child b -x Boo')
590 self.complete_from_to('type filter delete ', ['Boo'])
592 self.runCmd('type format add -f hex Coo')
593 self.complete_from_to('type format delete ', ['Coo'])
594 self.runCmd('type format add -f hex -x Doo')
595 self.complete_from_to('type format delete ', ['Doo'])
597 self.runCmd('type summary add -c Eoo')
598 self.complete_from_to('type summary delete ', ['Eoo'])
599 self.runCmd('type summary add -x -c Foo')
600 self.complete_from_to('type summary delete ', ['Foo'])
602 self.runCmd('type synthetic add Goo -l test')
603 self.complete_from_to('type synthetic delete ', ['Goo'])
604 self.runCmd('type synthetic add -x Hoo -l test')
605 self.complete_from_to('type synthetic delete ', ['Hoo'])
608 def test_register_read_and_write_on_x86(self): argument
612 self.complete_from_to('register read ',
614 self.complete_from_to('register write ',
617 self.build()
618 self.main_source_spec = lldb.SBFileSpec("main.cpp")
619 lldbutil.run_to_source_breakpoint(self, '// Break here', self.main_source_spec)
622 self.complete_from_to('register read ',
626 self.complete_from_to('register read r',
630 self.complete_from_to('register read ra',
633 self.complete_from_to('register read rax ',
638 self.completions_match('register read $rb',
641 self.completions_match('register read $ra',
643 self.complete_from_to('register read rax $',
647 self.complete_from_to('register read $rax ',
653 self.complete_from_to('register write ',
657 self.complete_from_to('register write r',
661 self.complete_from_to('register write ra',
663 self.complete_from_to('register write rb',
667 self.complete_from_to('register write rbx ',
670 def test_common_completion_target_stophook_ids(self): argument
674 self.complete_from_to('target stop-hook ' + subcommand + ' ',
677 self.build()
678 self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
679 self.runCmd('target stop-hook add -o test')
682 self.complete_from_to('target stop-hook ' + subcommand + ' ',
687 self.complete_from_to('target stop-hook ' + subcommand + ' 1 ',
690 def test_common_completion_type_language(self): argument
691 self.complete_from_to('type category -l ', ['c'])
693 def test_target_modules_load_dash_u(self): argument
694 self.build()
695 target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
696 … self.complete_from_to('target modules load -u ', [target.GetModuleAtIndex(0).GetUUIDString()])
698 def test_complete_breakpoint_with_ids(self): argument
705 self.complete_from_to('breakpoint ' + subcommand + ' ',
708 self.build()
709 target = self.dbg.CreateTarget(self.getBuildArtifact('a.out'))
710 self.assertTrue(target, VALID_TARGET)
713 self.assertTrue(bp)
714 self.assertEqual(bp.GetNumLocations(), 1)
717 self.complete_from_to('breakpoint ' + subcommand + ' ',
721 self.assertTrue(bp2)
722 self.assertEqual(bp2.GetNumLocations(), 1)
725 self.complete_from_to('breakpoint ' + subcommand + ' ',
730 self.complete_from_to('breakpoint ' + subcommand + ' 1 ',
734 def test_complete_breakpoint_with_names(self): argument
735 self.build()
736 target = self.dbg.CreateTarget(self.getBuildArtifact('a.out'))
737 self.assertTrue(target, VALID_TARGET)
740 self.complete_from_to('breakpoint read -N ', 'breakpoint read -N ')
741 self.complete_from_to('breakpoint read -f breakpoints.json -N ', ['mm'])
742 …self.complete_from_to('breakpoint read -f breakpoints.json -N n', 'breakpoint read -f breakpoints.…
743 …self.complete_from_to('breakpoint read -f breakpoints_invalid.json -N ', 'breakpoint read -f break…
747 self.assertTrue(bp1)
748 self.assertEqual(bp1.GetNumLocations(), 1)
749 self.complete_from_to('breakpoint set -N n', 'breakpoint set -N n')
750 self.assertTrue(bp1.AddNameWithErrorHandling("nn"))
751 self.complete_from_to('breakpoint set -N ', 'breakpoint set -N nn')