This is an archive of the discontinued LLVM Phabricator instance.

[lldb] thread index common completion for commands like `thread select/step-over`
ClosedPublic

Authored by MrHate on Jul 18 2020, 2:25 AM.

Details

Summary
  1. added a common completion completing with a list of the threads of the current process;
  2. apply the common completion above to these commands: thread continue/info/exception/select/step-in/step-inst/step-inst-over/ step-out/step-over/step-script​;
  3. correlated test case test_common_completion_thread_index.

Diff Detail

Event Timeline

MrHate created this revision.Jul 18 2020, 2:25 AM
MrHate updated this revision to Diff 278979.Jul 18 2020, 2:43 AM
  • Removed the argument cursor check in these commands: thread conitnue/exceptioin/info.
MrHate updated this revision to Diff 278990.Jul 18 2020, 4:43 AM
  • Renamed completion function name from ThreadIndex to ThreadIndexes.

Sweet, thanks!

lldb/test/API/functionalities/completion/TestCompletion.py
395

I think Completion should do nothing without a running process. (not work sounds like its somehow behaving unintentionally).

MrHate updated this revision to Diff 279154.Jul 20 2020, 2:25 AM
  • Use do nothing instead of not work now.
This revision is now accepted and ready to land.Jul 23 2020, 12:26 PM