LLDB  mainline
CommandCompletions.cpp
Go to the documentation of this file.
1 //===-- CommandCompletions.cpp --------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "llvm/ADT/SmallString.h"
10 #include "llvm/ADT/StringSet.h"
11 
13 #include "lldb/Core/FileSpecList.h"
14 #include "lldb/Core/Module.h"
17 #include "lldb/Host/FileSystem.h"
22 #include "lldb/Symbol/Variable.h"
23 #include "lldb/Target/Language.h"
24 #include "lldb/Target/Process.h"
26 #include "lldb/Target/Thread.h"
27 #include "lldb/Utility/FileSpec.h"
30 
31 #include "llvm/Support/FileSystem.h"
32 #include "llvm/Support/Path.h"
33 
34 using namespace lldb_private;
35 
36 // This is the command completion callback that is used to complete the
37 // argument of the option it is bound to (in the OptionDefinition table
38 // below).
39 typedef void (*CompletionCallback)(CommandInterpreter &interpreter,
40  CompletionRequest &request,
41  // A search filter to limit the search...
42  lldb_private::SearchFilter *searcher);
43 
47 };
48 
50  CommandInterpreter &interpreter, uint32_t completion_mask,
51  CompletionRequest &request, SearchFilter *searcher) {
52  bool handled = false;
53 
54  const CommonCompletionElement common_completions[] = {
81  {eNoCompletion, nullptr} // This one has to be last in the list.
82  };
83 
84  for (int i = 0;; i++) {
85  if (common_completions[i].type == eNoCompletion)
86  break;
87  else if ((common_completions[i].type & completion_mask) ==
88  common_completions[i].type &&
89  common_completions[i].callback != nullptr) {
90  handled = true;
91  common_completions[i].callback(interpreter, request, searcher);
92  }
93  }
94  return handled;
95 }
96 
97 namespace {
98 // The Completer class is a convenient base class for building searchers that
99 // go along with the SearchFilter passed to the standard Completer functions.
100 class Completer : public Searcher {
101 public:
102  Completer(CommandInterpreter &interpreter, CompletionRequest &request)
103  : m_interpreter(interpreter), m_request(request) {}
104 
105  ~Completer() override = default;
106 
107  CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context,
108  Address *addr) override = 0;
109 
110  lldb::SearchDepth GetDepth() override = 0;
111 
112  virtual void DoCompletion(SearchFilter *filter) = 0;
113 
114 protected:
115  CommandInterpreter &m_interpreter;
116  CompletionRequest &m_request;
117 
118 private:
119  Completer(const Completer &) = delete;
120  const Completer &operator=(const Completer &) = delete;
121 };
122 } // namespace
123 
124 // SourceFileCompleter implements the source file completer
125 namespace {
126 class SourceFileCompleter : public Completer {
127 public:
128  SourceFileCompleter(CommandInterpreter &interpreter,
129  CompletionRequest &request)
130  : Completer(interpreter, request), m_matching_files() {
131  FileSpec partial_spec(m_request.GetCursorArgumentPrefix());
132  m_file_name = partial_spec.GetFilename().GetCString();
133  m_dir_name = partial_spec.GetDirectory().GetCString();
134  }
135 
136  lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthCompUnit; }
137 
138  Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
139  SymbolContext &context,
140  Address *addr) override {
141  if (context.comp_unit != nullptr) {
142  const char *cur_file_name =
144  const char *cur_dir_name =
146 
147  bool match = false;
148  if (m_file_name && cur_file_name &&
149  strstr(cur_file_name, m_file_name) == cur_file_name)
150  match = true;
151 
152  if (match && m_dir_name && cur_dir_name &&
153  strstr(cur_dir_name, m_dir_name) != cur_dir_name)
154  match = false;
155 
156  if (match) {
157  m_matching_files.AppendIfUnique(context.comp_unit->GetPrimaryFile());
158  }
159  }
161  }
162 
163  void DoCompletion(SearchFilter *filter) override {
164  filter->Search(*this);
165  // Now convert the filelist to completions:
166  for (size_t i = 0; i < m_matching_files.GetSize(); i++) {
167  m_request.AddCompletion(
168  m_matching_files.GetFileSpecAtIndex(i).GetFilename().GetCString());
169  }
170  }
171 
172 private:
173  FileSpecList m_matching_files;
174  const char *m_file_name;
175  const char *m_dir_name;
176 
177  SourceFileCompleter(const SourceFileCompleter &) = delete;
178  const SourceFileCompleter &operator=(const SourceFileCompleter &) = delete;
179 };
180 } // namespace
181 
182 static bool regex_chars(const char comp) {
183  return llvm::StringRef("[](){}+.*|^$\\?").contains(comp);
184 }
185 
186 namespace {
187 class SymbolCompleter : public Completer {
188 
189 public:
190  SymbolCompleter(CommandInterpreter &interpreter, CompletionRequest &request)
191  : Completer(interpreter, request) {
192  std::string regex_str;
193  if (!m_request.GetCursorArgumentPrefix().empty()) {
194  regex_str.append("^");
195  regex_str.append(std::string(m_request.GetCursorArgumentPrefix()));
196  } else {
197  // Match anything since the completion string is empty
198  regex_str.append(".");
199  }
200  std::string::iterator pos =
201  find_if(regex_str.begin() + 1, regex_str.end(), regex_chars);
202  while (pos < regex_str.end()) {
203  pos = regex_str.insert(pos, '\\');
204  pos = find_if(pos + 2, regex_str.end(), regex_chars);
205  }
206  m_regex = RegularExpression(regex_str);
207  }
208 
209  lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
210 
211  Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
212  SymbolContext &context,
213  Address *addr) override {
214  if (context.module_sp) {
215  SymbolContextList sc_list;
216  ModuleFunctionSearchOptions function_options;
217  function_options.include_symbols = true;
218  function_options.include_inlines = true;
219  context.module_sp->FindFunctions(m_regex, function_options, sc_list);
220 
221  SymbolContext sc;
222  // Now add the functions & symbols to the list - only add if unique:
223  for (uint32_t i = 0; i < sc_list.GetSize(); i++) {
224  if (sc_list.GetContextAtIndex(i, sc)) {
225  ConstString func_name = sc.GetFunctionName(Mangled::ePreferDemangled);
226  // Ensure that the function name matches the regex. This is more than
227  // a sanity check. It is possible that the demangled function name
228  // does not start with the prefix, for example when it's in an
229  // anonymous namespace.
230  if (!func_name.IsEmpty() && m_regex.Execute(func_name.GetStringRef()))
231  m_match_set.insert(func_name);
232  }
233  }
234  }
236  }
237 
238  void DoCompletion(SearchFilter *filter) override {
239  filter->Search(*this);
240  collection::iterator pos = m_match_set.begin(), end = m_match_set.end();
241  for (pos = m_match_set.begin(); pos != end; pos++)
242  m_request.AddCompletion((*pos).GetCString());
243  }
244 
245 private:
246  RegularExpression m_regex;
247  typedef std::set<ConstString> collection;
248  collection m_match_set;
249 
250  SymbolCompleter(const SymbolCompleter &) = delete;
251  const SymbolCompleter &operator=(const SymbolCompleter &) = delete;
252 };
253 } // namespace
254 
255 namespace {
256 class ModuleCompleter : public Completer {
257 public:
258  ModuleCompleter(CommandInterpreter &interpreter, CompletionRequest &request)
259  : Completer(interpreter, request) {
260  FileSpec partial_spec(m_request.GetCursorArgumentPrefix());
261  m_file_name = partial_spec.GetFilename().GetCString();
262  m_dir_name = partial_spec.GetDirectory().GetCString();
263  }
264 
265  lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
266 
267  Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
268  SymbolContext &context,
269  Address *addr) override {
270  if (context.module_sp) {
271  const char *cur_file_name =
272  context.module_sp->GetFileSpec().GetFilename().GetCString();
273  const char *cur_dir_name =
274  context.module_sp->GetFileSpec().GetDirectory().GetCString();
275 
276  bool match = false;
277  if (m_file_name && cur_file_name &&
278  strstr(cur_file_name, m_file_name) == cur_file_name)
279  match = true;
280 
281  if (match && m_dir_name && cur_dir_name &&
282  strstr(cur_dir_name, m_dir_name) != cur_dir_name)
283  match = false;
284 
285  if (match) {
286  m_request.AddCompletion(cur_file_name);
287  }
288  }
290  }
291 
292  void DoCompletion(SearchFilter *filter) override { filter->Search(*this); }
293 
294 private:
295  const char *m_file_name;
296  const char *m_dir_name;
297 
298  ModuleCompleter(const ModuleCompleter &) = delete;
299  const ModuleCompleter &operator=(const ModuleCompleter &) = delete;
300 };
301 } // namespace
302 
304  CompletionRequest &request,
305  SearchFilter *searcher) {
306  SourceFileCompleter completer(interpreter, request);
307 
308  if (searcher == nullptr) {
309  lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget();
310  SearchFilterForUnconstrainedSearches null_searcher(target_sp);
311  completer.DoCompletion(&null_searcher);
312  } else {
313  completer.DoCompletion(searcher);
314  }
315 }
316 
317 static void DiskFilesOrDirectories(const llvm::Twine &partial_name,
318  bool only_directories,
319  CompletionRequest &request,
320  TildeExpressionResolver &Resolver) {
321  llvm::SmallString<256> CompletionBuffer;
322  llvm::SmallString<256> Storage;
323  partial_name.toVector(CompletionBuffer);
324 
325  if (CompletionBuffer.size() >= PATH_MAX)
326  return;
327 
328  namespace path = llvm::sys::path;
329 
330  llvm::StringRef SearchDir;
331  llvm::StringRef PartialItem;
332 
333  if (CompletionBuffer.startswith("~")) {
334  llvm::StringRef Buffer = CompletionBuffer;
335  size_t FirstSep =
336  Buffer.find_if([](char c) { return path::is_separator(c); });
337 
338  llvm::StringRef Username = Buffer.take_front(FirstSep);
339  llvm::StringRef Remainder;
340  if (FirstSep != llvm::StringRef::npos)
341  Remainder = Buffer.drop_front(FirstSep + 1);
342 
343  llvm::SmallString<256> Resolved;
344  if (!Resolver.ResolveExact(Username, Resolved)) {
345  // We couldn't resolve it as a full username. If there were no slashes
346  // then this might be a partial username. We try to resolve it as such
347  // but after that, we're done regardless of any matches.
348  if (FirstSep == llvm::StringRef::npos) {
349  llvm::StringSet<> MatchSet;
350  Resolver.ResolvePartial(Username, MatchSet);
351  for (const auto &S : MatchSet) {
352  Resolved = S.getKey();
353  path::append(Resolved, path::get_separator());
354  request.AddCompletion(Resolved, "", CompletionMode::Partial);
355  }
356  }
357  return;
358  }
359 
360  // If there was no trailing slash, then we're done as soon as we resolve
361  // the expression to the correct directory. Otherwise we need to continue
362  // looking for matches within that directory.
363  if (FirstSep == llvm::StringRef::npos) {
364  // Make sure it ends with a separator.
365  path::append(CompletionBuffer, path::get_separator());
366  request.AddCompletion(CompletionBuffer, "", CompletionMode::Partial);
367  return;
368  }
369 
370  // We want to keep the form the user typed, so we special case this to
371  // search in the fully resolved directory, but CompletionBuffer keeps the
372  // unmodified form that the user typed.
373  Storage = Resolved;
374  llvm::StringRef RemainderDir = path::parent_path(Remainder);
375  if (!RemainderDir.empty()) {
376  // Append the remaining path to the resolved directory.
377  Storage.append(path::get_separator());
378  Storage.append(RemainderDir);
379  }
380  SearchDir = Storage;
381  } else {
382  SearchDir = path::parent_path(CompletionBuffer);
383  }
384 
385  size_t FullPrefixLen = CompletionBuffer.size();
386 
387  PartialItem = path::filename(CompletionBuffer);
388 
389  // path::filename() will return "." when the passed path ends with a
390  // directory separator. We have to filter those out, but only when the
391  // "." doesn't come from the completion request itself.
392  if (PartialItem == "." && path::is_separator(CompletionBuffer.back()))
393  PartialItem = llvm::StringRef();
394 
395  if (SearchDir.empty()) {
396  llvm::sys::fs::current_path(Storage);
397  SearchDir = Storage;
398  }
399  assert(!PartialItem.contains(path::get_separator()));
400 
401  // SearchDir now contains the directory to search in, and Prefix contains the
402  // text we want to match against items in that directory.
403 
405  std::error_code EC;
406  llvm::vfs::directory_iterator Iter = fs.DirBegin(SearchDir, EC);
407  llvm::vfs::directory_iterator End;
408  for (; Iter != End && !EC; Iter.increment(EC)) {
409  auto &Entry = *Iter;
410  llvm::ErrorOr<llvm::vfs::Status> Status = fs.GetStatus(Entry.path());
411 
412  if (!Status)
413  continue;
414 
415  auto Name = path::filename(Entry.path());
416 
417  // Omit ".", ".."
418  if (Name == "." || Name == ".." || !Name.startswith(PartialItem))
419  continue;
420 
421  bool is_dir = Status->isDirectory();
422 
423  // If it's a symlink, then we treat it as a directory as long as the target
424  // is a directory.
425  if (Status->isSymlink()) {
426  FileSpec symlink_filespec(Entry.path());
427  FileSpec resolved_filespec;
428  auto error = fs.ResolveSymbolicLink(symlink_filespec, resolved_filespec);
429  if (error.Success())
430  is_dir = fs.IsDirectory(symlink_filespec);
431  }
432 
433  if (only_directories && !is_dir)
434  continue;
435 
436  // Shrink it back down so that it just has the original prefix the user
437  // typed and remove the part of the name which is common to the located
438  // item and what the user typed.
439  CompletionBuffer.resize(FullPrefixLen);
440  Name = Name.drop_front(PartialItem.size());
441  CompletionBuffer.append(Name);
442 
443  if (is_dir) {
444  path::append(CompletionBuffer, path::get_separator());
445  }
446 
447  CompletionMode mode =
449  request.AddCompletion(CompletionBuffer, "", mode);
450  }
451 }
452 
453 static void DiskFilesOrDirectories(const llvm::Twine &partial_name,
454  bool only_directories, StringList &matches,
455  TildeExpressionResolver &Resolver) {
456  CompletionResult result;
457  std::string partial_name_str = partial_name.str();
458  CompletionRequest request(partial_name_str, partial_name_str.size(), result);
459  DiskFilesOrDirectories(partial_name, only_directories, request, Resolver);
460  result.GetMatches(matches);
461 }
462 
464  bool only_directories) {
466  DiskFilesOrDirectories(request.GetCursorArgumentPrefix(), only_directories,
467  request, resolver);
468 }
469 
471  CompletionRequest &request,
472  SearchFilter *searcher) {
473  DiskFilesOrDirectories(request, /*only_dirs*/ false);
474 }
475 
476 void CommandCompletions::DiskFiles(const llvm::Twine &partial_file_name,
477  StringList &matches,
478  TildeExpressionResolver &Resolver) {
479  DiskFilesOrDirectories(partial_file_name, false, matches, Resolver);
480 }
481 
483  CompletionRequest &request,
484  SearchFilter *searcher) {
485  DiskFilesOrDirectories(request, /*only_dirs*/ true);
486 }
487 
488 void CommandCompletions::DiskDirectories(const llvm::Twine &partial_file_name,
489  StringList &matches,
490  TildeExpressionResolver &Resolver) {
491  DiskFilesOrDirectories(partial_file_name, true, matches, Resolver);
492 }
493 
495  CompletionRequest &request,
496  SearchFilter *searcher) {
497  lldb::PlatformSP platform_sp =
499  if (platform_sp)
500  platform_sp->AutoCompleteDiskFileOrDirectory(request, false);
501 }
502 
504  CompletionRequest &request,
505  SearchFilter *searcher) {
506  lldb::PlatformSP platform_sp =
508  if (platform_sp)
509  platform_sp->AutoCompleteDiskFileOrDirectory(request, true);
510 }
511 
513  CompletionRequest &request,
514  SearchFilter *searcher) {
515  ModuleCompleter completer(interpreter, request);
516 
517  if (searcher == nullptr) {
518  lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget();
519  SearchFilterForUnconstrainedSearches null_searcher(target_sp);
520  completer.DoCompletion(&null_searcher);
521  } else {
522  completer.DoCompletion(searcher);
523  }
524 }
525 
527  CompletionRequest &request,
528  SearchFilter *searcher) {
529  const ExecutionContext &exe_ctx = interpreter.GetExecutionContext();
530  if (!exe_ctx.HasTargetScope())
531  return;
532 
533  exe_ctx.GetTargetPtr()->GetImages().ForEach(
534  [&request](const lldb::ModuleSP &module) {
535  StreamString strm;
536  module->GetDescription(strm.AsRawOstream(),
538  request.TryCompleteCurrentArg(module->GetUUID().GetAsString(),
539  strm.GetString());
540  return true;
541  });
542 }
543 
545  CompletionRequest &request,
546  SearchFilter *searcher) {
547  SymbolCompleter completer(interpreter, request);
548 
549  if (searcher == nullptr) {
550  lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget();
551  SearchFilterForUnconstrainedSearches null_searcher(target_sp);
552  completer.DoCompletion(&null_searcher);
553  } else {
554  completer.DoCompletion(searcher);
555  }
556 }
557 
559  CompletionRequest &request,
560  SearchFilter *searcher) {
561  // Cache the full setting name list
562  static StringList g_property_names;
563  if (g_property_names.GetSize() == 0) {
564  // Generate the full setting name list on demand
565  lldb::OptionValuePropertiesSP properties_sp(
566  interpreter.GetDebugger().GetValueProperties());
567  if (properties_sp) {
568  StreamString strm;
569  properties_sp->DumpValue(nullptr, strm, OptionValue::eDumpOptionName);
570  const std::string &str = std::string(strm.GetString());
571  g_property_names.SplitIntoLines(str.c_str(), str.size());
572  }
573  }
574 
575  for (const std::string &s : g_property_names)
576  request.TryCompleteCurrentArg(s);
577 }
578 
580  CompletionRequest &request,
581  SearchFilter *searcher) {
583  request);
584 }
585 
587  CompletionRequest &request,
588  SearchFilter *searcher) {
589  ArchSpec::AutoComplete(request);
590 }
591 
593  CompletionRequest &request,
594  SearchFilter *searcher) {
595  Variable::AutoComplete(interpreter.GetExecutionContext(), request);
596 }
597 
599  CompletionRequest &request,
600  SearchFilter *searcher) {
601  std::string reg_prefix = "";
602  if (request.GetCursorArgumentPrefix().startswith("$"))
603  reg_prefix = "$";
604 
605  RegisterContext *reg_ctx =
606  interpreter.GetExecutionContext().GetRegisterContext();
607  const size_t reg_num = reg_ctx->GetRegisterCount();
608  for (size_t reg_idx = 0; reg_idx < reg_num; ++reg_idx) {
609  const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex(reg_idx);
610  request.TryCompleteCurrentArg(reg_prefix + reg_info->name,
611  reg_info->alt_name);
612  }
613 }
614 
616  CompletionRequest &request,
617  SearchFilter *searcher) {
618  lldb::TargetSP target = interpreter.GetDebugger().GetSelectedTarget();
619  if (!target)
620  return;
621 
622  const BreakpointList &breakpoints = target->GetBreakpointList();
623 
624  std::unique_lock<std::recursive_mutex> lock;
625  target->GetBreakpointList().GetListMutex(lock);
626 
627  size_t num_breakpoints = breakpoints.GetSize();
628  if (num_breakpoints == 0)
629  return;
630 
631  for (size_t i = 0; i < num_breakpoints; ++i) {
632  lldb::BreakpointSP bp = breakpoints.GetBreakpointAtIndex(i);
633 
634  StreamString s;
635  bp->GetDescription(&s, lldb::eDescriptionLevelBrief);
636  llvm::StringRef bp_info = s.GetString();
637 
638  const size_t colon_pos = bp_info.find_first_of(':');
639  if (colon_pos != llvm::StringRef::npos)
640  bp_info = bp_info.drop_front(colon_pos + 2);
641 
642  request.TryCompleteCurrentArg(std::to_string(bp->GetID()), bp_info);
643  }
644 }
645 
647  CompletionRequest &request,
648  SearchFilter *searcher) {
649  lldb::TargetSP target = interpreter.GetDebugger().GetSelectedTarget();
650  if (!target)
651  return;
652 
653  std::vector<std::string> name_list;
654  target->GetBreakpointNames(name_list);
655 
656  for (const std::string &name : name_list)
657  request.TryCompleteCurrentArg(name);
658 }
659 
661  CompletionRequest &request,
662  SearchFilter *searcher) {
664  request);
665 }
667  CompletionRequest &request,
668  SearchFilter *searcher) {
669  // Currently the only valid options for disassemble -F are default, and for
670  // Intel architectures, att and intel.
671  static const char *flavors[] = {"default", "att", "intel"};
672  for (const char *flavor : flavors) {
673  request.TryCompleteCurrentArg(flavor);
674  }
675 }
676 
678  CompletionRequest &request,
679  SearchFilter *searcher) {
680  lldb::PlatformSP platform_sp(interpreter.GetPlatform(true));
681  if (!platform_sp)
682  return;
683  ProcessInstanceInfoList process_infos;
684  ProcessInstanceInfoMatch match_info;
685  platform_sp->FindProcesses(match_info, process_infos);
686  for (const ProcessInstanceInfo &info : process_infos)
687  request.TryCompleteCurrentArg(std::to_string(info.GetProcessID()),
688  info.GetNameAsStringRef());
689 }
690 
692  CompletionRequest &request,
693  SearchFilter *searcher) {
694  lldb::PlatformSP platform_sp(interpreter.GetPlatform(true));
695  if (!platform_sp)
696  return;
697  ProcessInstanceInfoList process_infos;
698  ProcessInstanceInfoMatch match_info;
699  platform_sp->FindProcesses(match_info, process_infos);
700  for (const ProcessInstanceInfo &info : process_infos)
701  request.TryCompleteCurrentArg(info.GetNameAsStringRef());
702 }
703 
705  CompletionRequest &request,
706  SearchFilter *searcher) {
707  for (int bit :
708  Language::GetLanguagesSupportingTypeSystems().bitvector.set_bits()) {
709  request.TryCompleteCurrentArg(
711  }
712 }
713 
715  CompletionRequest &request,
716  SearchFilter *searcher) {
717  const ExecutionContext &exe_ctx = interpreter.GetExecutionContext();
718  if (!exe_ctx.HasProcessScope())
719  return;
720 
721  lldb::ThreadSP thread_sp = exe_ctx.GetThreadSP();
722  const uint32_t frame_num = thread_sp->GetStackFrameCount();
723  for (uint32_t i = 0; i < frame_num; ++i) {
724  lldb::StackFrameSP frame_sp = thread_sp->GetStackFrameAtIndex(i);
725  StreamString strm;
726  frame_sp->Dump(&strm, false, true);
727  request.TryCompleteCurrentArg(std::to_string(i), strm.GetString());
728  }
729 }
730 
732  CompletionRequest &request,
733  SearchFilter *searcher) {
734  const lldb::TargetSP target_sp =
735  interpreter.GetExecutionContext().GetTargetSP();
736  if (!target_sp)
737  return;
738 
739  const size_t num = target_sp->GetNumStopHooks();
740  for (size_t idx = 0; idx < num; ++idx) {
741  StreamString strm;
742  // The value 11 is an offset to make the completion description looks
743  // neater.
744  strm.SetIndentLevel(11);
745  const Target::StopHookSP stophook_sp = target_sp->GetStopHookAtIndex(idx);
746  stophook_sp->GetDescription(&strm, lldb::eDescriptionLevelInitial);
747  request.TryCompleteCurrentArg(std::to_string(stophook_sp->GetID()),
748  strm.GetString());
749  }
750 }
751 
753  CompletionRequest &request,
754  SearchFilter *searcher) {
755  const ExecutionContext &exe_ctx = interpreter.GetExecutionContext();
756  if (!exe_ctx.HasProcessScope())
757  return;
758 
759  ThreadList &threads = exe_ctx.GetProcessPtr()->GetThreadList();
760  lldb::ThreadSP thread_sp;
761  for (uint32_t idx = 0; (thread_sp = threads.GetThreadAtIndex(idx)); ++idx) {
762  StreamString strm;
763  thread_sp->GetStatus(strm, 0, 1, 1, true);
764  request.TryCompleteCurrentArg(std::to_string(thread_sp->GetIndexID()),
765  strm.GetString());
766  }
767 }
768 
770  CompletionRequest &request,
771  SearchFilter *searcher) {
772  const ExecutionContext &exe_ctx = interpreter.GetExecutionContext();
773  if (!exe_ctx.HasTargetScope())
774  return;
775 
776  const WatchpointList &wp_list = exe_ctx.GetTargetPtr()->GetWatchpointList();
777  for (lldb::WatchpointSP wp_sp : wp_list.Watchpoints()) {
778  StreamString strm;
779  wp_sp->Dump(&strm);
780  request.TryCompleteCurrentArg(std::to_string(wp_sp->GetID()),
781  strm.GetString());
782  }
783 }
784 
786  CompletionRequest &request,
787  SearchFilter *searcher) {
789  [&request](const lldb::TypeCategoryImplSP &category_sp) {
790  request.TryCompleteCurrentArg(category_sp->GetName(),
791  category_sp->GetDescription());
792  return true;
793  });
794 }
lldb_private::ProcessInstanceInfo
Definition: ProcessInfo.h:108
lldb::eSearchDepthCompUnit
@ eSearchDepthCompUnit
Definition: lldb-enumerations.h:287
lldb_private::CommandCompletions::ePlatformPluginCompletion
@ ePlatformPluginCompletion
Definition: CommandCompletions.h:34
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::SymbolContext::comp_unit
CompileUnit * comp_unit
The CompileUnit for a given query.
Definition: SymbolContext.h:319
lldb_private::CommandCompletions::RemoteDiskDirectories
static void RemoteDiskDirectories(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:503
lldb_private::CommandCompletions::PlatformPluginNames
static void PlatformPluginNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:579
lldb_private::Properties::GetValueProperties
virtual lldb::OptionValuePropertiesSP GetValueProperties() const
Definition: UserSettingsController.h:42
CompletionCallback
void(* CompletionCallback)(CommandInterpreter &interpreter, CompletionRequest &request, lldb_private::SearchFilter *searcher)
Definition: CommandCompletions.cpp:39
lldb_private::ExecutionContext::GetThreadSP
const lldb::ThreadSP & GetThreadSP() const
Get accessor to get the thread shared pointer.
Definition: ExecutionContext.h:464
lldb_private::BreakpointList
General Outline: Allows adding and removing breakpoints and find by ID and index.
Definition: BreakpointList.h:25
lldb_private::StandardTildeExpressionResolver
Definition: TildeExpressionResolver.h:56
lldb_private::ExecutionContext::HasTargetScope
bool HasTargetScope() const
Returns true the ExecutionContext object contains a valid target.
Definition: ExecutionContext.cpp:381
lldb_private::RegularExpression
Definition: RegularExpression.h:18
lldb::SearchDepth
SearchDepth
Definition: lldb-enumerations.h:283
FileSystem.h
lldb_private::RegisterContext::GetRegisterCount
virtual size_t GetRegisterCount()=0
CompileUnit.h
lldb_private::CommandCompletions::BreakpointNames
static void BreakpointNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:646
lldb_private::CommandCompletions::eProcessPluginCompletion
@ eProcessPluginCompletion
Definition: CommandCompletions.h:39
lldb_private::ExecutionContext::GetProcessPtr
Process * GetProcessPtr() const
Returns a pointer to the process object.
Definition: ExecutionContext.cpp:208
lldb_private::CompletionMode::Partial
@ Partial
The current token has been partially completed.
lldb_private::CommandCompletions::WatchPointIDs
static void WatchPointIDs(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:769
lldb_private::CommandCompletions::ProcessPluginNames
static void ProcessPluginNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:660
lldb_private::CommandCompletions::ModuleUUIDs
static void ModuleUUIDs(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:526
lldb_private::CompletionRequest::TryCompleteCurrentArg
void TryCompleteCurrentArg(llvm::StringRef completion, llvm::StringRef description="")
Adds a possible completion string if the completion would complete the current argument.
Definition: CompletionRequest.h:180
lldb_private::WatchpointList::Watchpoints
WatchpointIterable Watchpoints() const
Definition: WatchpointList.h:193
lldb_private::Stream::SetIndentLevel
void SetIndentLevel(unsigned level)
Set the current indentation level.
Definition: Stream.cpp:163
lldb_private::CommandCompletions::RemoteDiskFiles
static void RemoteDiskFiles(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:494
lldb_private::FileSystem::GetStatus
llvm::ErrorOr< llvm::vfs::Status > GetStatus(const FileSpec &file_spec) const
Returns the Status object for the given file.
Definition: common/FileSystem.cpp:104
lldb_private::CommandCompletions::eModuleUUIDCompletion
@ eModuleUUIDCompletion
Definition: CommandCompletions.h:43
Module.h
lldb_private::Process::GetThreadList
ThreadList & GetThreadList()
Definition: Process.h:2116
DiskFilesOrDirectories
static void DiskFilesOrDirectories(const llvm::Twine &partial_name, bool only_directories, CompletionRequest &request, TildeExpressionResolver &Resolver)
Definition: CommandCompletions.cpp:317
lldb_private::FileSystem::IsDirectory
bool IsDirectory(const FileSpec &file_spec) const
Returns whether the given path is a directory.
Definition: common/FileSystem.cpp:189
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::CommandCompletions::eProcessNameCompletion
@ eProcessNameCompletion
Definition: CommandCompletions.h:49
lldb_private::ProcessInstanceInfoMatch
Definition: ProcessInfo.h:163
lldb_private::SymbolContextList
Definition: SymbolContext.h:379
lldb_private::SymbolContextList::GetContextAtIndex
bool GetContextAtIndex(size_t idx, SymbolContext &sc) const
Get accessor for a symbol context at index idx.
Definition: SymbolContext.cpp:1265
lldb_private::CommandInterpreter::GetPlatform
lldb::PlatformSP GetPlatform(bool prefer_target_platform)
lldb_private::StringList::SplitIntoLines
size_t SplitIntoLines(const std::string &lines)
Definition: StringList.cpp:146
lldb_private::SearchFilter::Search
virtual void Search(Searcher &searcher)
Call this method to do the search using the Searcher.
Definition: SearchFilter.cpp:204
lldb_private::CommandCompletions::eProcessIDCompletion
@ eProcessIDCompletion
Definition: CommandCompletions.h:48
lldb_private::CommandCompletions::VariablePath
static void VariablePath(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:592
lldb_private::Target::GetWatchpointList
WatchpointList & GetWatchpointList()
Definition: Target.h:724
lldb_private::FileSystem
Definition: FileSystem.h:29
lldb_private::CompletionResult::GetMatches
void GetMatches(StringList &matches) const
Adds all collected completion matches to the given list.
Definition: CompletionRequest.cpp:71
lldb_private::CommandCompletions::SettingsNames
static void SettingsNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:558
Language.h
lldb_private::ModuleFunctionSearchOptions::include_symbols
bool include_symbols
Include the symbol table.
Definition: Module.h:64
lldb_private::TildeExpressionResolver::ResolveExact
virtual bool ResolveExact(llvm::StringRef Expr, llvm::SmallVectorImpl< char > &Output)=0
Resolve a Tilde Expression contained according to bash rules.
lldb_private::CommandCompletions::eTypeCategoryNameCompletion
@ eTypeCategoryNameCompletion
Definition: CommandCompletions.h:52
lldb_private::RegisterContext::GetRegisterInfoAtIndex
virtual const RegisterInfo * GetRegisterInfoAtIndex(size_t reg)=0
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::Target::GetImages
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition: Target.h:928
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
lldb_private::CommandCompletions::SourceFiles
static void SourceFiles(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:303
Process.h
lldb_private::StringList::GetSize
size_t GetSize() const
Definition: StringList.cpp:68
lldb_private::ModuleFunctionSearchOptions::include_inlines
bool include_inlines
Include inlined functions.
Definition: Module.h:66
lldb_private::CommandCompletions::eFrameIndexCompletion
@ eFrameIndexCompletion
Definition: CommandCompletions.h:42
lldb_private::FileSpec
Definition: FileSpec.h:56
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::OptionValue::eDumpOptionName
@ eDumpOptionName
Definition: OptionValue.h:51
lldb_private::CommandCompletions::eWatchPointIDCompletion
@ eWatchPointIDCompletion
Definition: CommandCompletions.h:46
lldb_private::PlatformList::GetSelectedPlatform
lldb::PlatformSP GetSelectedPlatform()
Select the active platform.
Definition: Platform.h:987
lldb_private::ExecutionContext::GetRegisterContext
RegisterContext * GetRegisterContext() const
Definition: ExecutionContext.cpp:192
lldb_private::CommandCompletions::eSourceFileCompletion
@ eSourceFileCompletion
Definition: CommandCompletions.h:28
lldb_private::Language::GetLanguagesSupportingTypeSystems
static LanguageSet GetLanguagesSupportingTypeSystems()
Definition: Language.cpp:358
lldb_private::CommandCompletions::eBreakpointCompletion
@ eBreakpointCompletion
Definition: CommandCompletions.h:38
CommonCompletionElement::callback
CompletionCallback callback
Definition: CommandCompletions.cpp:46
lldb_private::CommandCompletions::eStopHookIDCompletion
@ eStopHookIDCompletion
Definition: CommandCompletions.h:44
Watchpoint.h
lldb_private::ConstString::GetStringRef
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
Definition: ConstString.h:202
lldb_private::SearchFilter
General Outline: Provides the callback and search depth for the SearchFilter search.
Definition: SearchFilter.h:83
lldb_private::CommandCompletions::ProcessNames
static void ProcessNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:691
lldb_private::ConstString::IsEmpty
bool IsEmpty() const
Test for empty string.
Definition: ConstString.h:304
lldb_private::FileSystem::ResolveSymbolicLink
Status ResolveSymbolicLink(const FileSpec &src, FileSpec &dst)
Definition: FileSystemPosix.cpp:56
lldb_private::CommandCompletions::eRegisterCompletion
@ eRegisterCompletion
Definition: CommandCompletions.h:37
lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks
static bool InvokeCommonCompletionCallbacks(CommandInterpreter &interpreter, uint32_t completion_mask, lldb_private::CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:49
lldb_private::CommandCompletions::eNoCompletion
@ eNoCompletion
Definition: CommandCompletions.h:27
StreamString.h
lldb_private::TildeExpressionResolver::ResolvePartial
virtual bool ResolvePartial(llvm::StringRef Expr, llvm::StringSet<> &Output)=0
Auto-complete a tilde expression with all matching values.
lldb_private::ThreadList
Definition: ThreadList.h:26
lldb_private::SymbolContextList::GetSize
uint32_t GetSize() const
Get accessor for a symbol context list size.
Definition: SymbolContext.cpp:1281
lldb_private::CompletionMode
CompletionMode
Definition: CompletionRequest.h:19
lldb_private::StringList
Definition: StringList.h:25
FileSpecList.h
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::Searcher::CallbackReturn
CallbackReturn
Definition: SearchFilter.h:44
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::CommandCompletions::eModuleCompletion
@ eModuleCompletion
Definition: CommandCompletions.h:32
lldb_private::SymbolContext::GetFunctionName
ConstString GetFunctionName(Mangled::NamePreference preference=Mangled::ePreferDemangled) const
Find a name of the innermost function for the symbol context.
Definition: SymbolContext.cpp:654
lldb_private::CommandCompletions::Symbols
static void Symbols(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:544
lldb_private::CompletionMode::Normal
@ Normal
The current token has been completed.
lldb_private::Target::StopHookSP
std::shared_ptr< StopHook > StopHookSP
Definition: Target.h:1297
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:214
lldb_private::ArchSpec::AutoComplete
static void AutoComplete(CompletionRequest &request)
Definition: ArchSpec.cpp:261
lldb_private::ModuleList::ForEach
void ForEach(std::function< bool(const lldb::ModuleSP &module_sp)> const &callback) const
Definition: ModuleList.cpp:1026
lldb_private::CompileUnit::GetPrimaryFile
const FileSpec & GetPrimaryFile() const
Return the primary source file associated with this compile unit.
Definition: CompileUnit.h:227
lldb_private::CommandCompletions::eRemoteDiskFileCompletion
@ eRemoteDiskFileCompletion
Definition: CommandCompletions.h:50
lldb_private::CompletionRequest::GetCursorArgumentPrefix
llvm::StringRef GetCursorArgumentPrefix() const
Definition: CompletionRequest.h:217
lldb_private::CommandCompletions::DiskDirectories
static void DiskDirectories(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:482
lldb_private::CommandCompletions::eRemoteDiskDirectoryCompletion
@ eRemoteDiskDirectoryCompletion
Definition: CommandCompletions.h:51
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:39
lldb_private::ThreadList::GetThreadAtIndex
lldb::ThreadSP GetThreadAtIndex(uint32_t idx, bool can_update=true)
Definition: ThreadList.cpp:90
lldb_private::BreakpointList::GetListMutex
void GetListMutex(std::unique_lock< std::recursive_mutex > &lock)
Sets the passed in Locker to hold the Breakpoint List mutex.
Definition: BreakpointList.cpp:192
Thread.h
lldb_private::CommandCompletions::DiskFiles
static void DiskFiles(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:470
lldb_private::CommandCompletions::Breakpoints
static void Breakpoints(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:615
lldb_private::bit
static uint32_t bit(const uint32_t val, const uint32_t msbit)
Definition: ARMUtils.h:269
lldb_private::RegisterContext
Definition: RegisterContext.h:17
OptionValueProperties.h
lldb_private::Variable::AutoComplete
static void AutoComplete(const ExecutionContext &exe_ctx, CompletionRequest &request)
Definition: Variable.cpp:733
lldb_private::ModuleFunctionSearchOptions
Options used by Module::FindFunctions.
Definition: Module.h:62
lldb_private::CommandCompletions::ThreadIndexes
static void ThreadIndexes(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:752
regex_chars
static bool regex_chars(const char comp)
Definition: CommandCompletions.cpp:182
lldb::eSearchDepthModule
@ eSearchDepthModule
Definition: lldb-enumerations.h:286
lldb_private::CommandCompletions::eDiskDirectoryCompletion
@ eDiskDirectoryCompletion
Definition: CommandCompletions.h:30
CommonCompletionElement::type
uint32_t type
Definition: CommandCompletions.cpp:45
lldb_private::CommandCompletions::eDisassemblyFlavorCompletion
@ eDisassemblyFlavorCompletion
Definition: CommandCompletions.h:40
lldb_private::Status
Definition: Status.h:44
lldb_private::WatchpointList
Definition: WatchpointList.h:27
DataVisualization.h
TildeExpressionResolver.h
lldb_private::BreakpointList::GetBreakpointAtIndex
lldb::BreakpointSP GetBreakpointAtIndex(size_t i) const
Returns a shared pointer to the breakpoint with index i.
Definition: BreakpointList.cpp:165
lldb_private::FileSystem::DirBegin
llvm::vfs::directory_iterator DirBegin(const FileSpec &file_spec, std::error_code &ec)
Get a directory iterator.
Definition: common/FileSystem.cpp:88
lldb_private::CommandCompletions::eBreakpointNameCompletion
@ eBreakpointNameCompletion
Definition: CommandCompletions.h:47
uint32_t
lldb_private::CommandInterpreter::GetDebugger
Debugger & GetDebugger()
Definition: CommandInterpreter.h:393
lldb_private::Address
Definition: Address.h:59
lldb_private::Debugger::GetPlatformList
PlatformList & GetPlatformList()
Definition: Debugger.h:225
lldb_private::CommandCompletions::Registers
static void Registers(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:598
CommonCompletionElement
Definition: CommandCompletions.cpp:44
lldb_private::CommandCompletions::TypeLanguages
static void TypeLanguages(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:704
lldb_private::FormatEntity::Entry
Definition: FormatEntity.h:40
lldb_private::Stream::AsRawOstream
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
Definition: Stream.h:357
lldb_private::SymbolContext::module_sp
lldb::ModuleSP module_sp
The Module for a given query.
Definition: SymbolContext.h:318
PluginManager.h
lldb_private::CommandCompletions::Modules
static void Modules(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:512
lldb_private::DataVisualization::Categories::ForEach
static void ForEach(TypeCategoryMap::ForEachCallback callback)
Definition: DataVisualization.cpp:156
lldb_private::ConstString::GetCString
const char * GetCString() const
Get the string value as a C string.
Definition: ConstString.h:216
lldb_private::ExecutionContext::GetTargetSP
const lldb::TargetSP & GetTargetSP() const
Get accessor to get the target shared pointer.
Definition: ExecutionContext.h:454
lldb_private::BreakpointList::GetSize
size_t GetSize() const
Returns the number of elements in this breakpoint list.
Definition: BreakpointList.h:79
lldb_private::CommandCompletions::ArchitectureNames
static void ArchitectureNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:586
lldb_private::SearchFilterForUnconstrainedSearches
Definition: SearchFilter.h:289
lldb_private::FileSystem::Instance
static FileSystem & Instance()
Definition: common/FileSystem.cpp:45
lldb_private::CommandCompletions::eTypeLanguageCompletion
@ eTypeLanguageCompletion
Definition: CommandCompletions.h:41
lldb_private::CommandCompletions::eVariablePathCompletion
@ eVariablePathCompletion
Definition: CommandCompletions.h:36
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::Debugger::GetSelectedTarget
lldb::TargetSP GetSelectedTarget()
Definition: Debugger.h:210
lldb_private::PluginManager::AutoCompleteProcessName
static void AutoCompleteProcessName(llvm::StringRef partial_name, CompletionRequest &request)
Definition: PluginManager.cpp:850
lldb_private::PluginManager::AutoCompletePlatformName
static void AutoCompletePlatformName(llvm::StringRef partial_name, CompletionRequest &request)
Definition: PluginManager.cpp:802
lldb_private::CommandCompletions::TypeCategoryNames
static void TypeCategoryNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:785
lldb_private::CommandCompletions::StopHookIDs
static void StopHookIDs(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:731
FileSpec.h
lldb_private::CompletionRequest::AddCompletion
void AddCompletion(llvm::StringRef completion, llvm::StringRef description="", CompletionMode mode=CompletionMode::Normal)
Adds a possible completion string.
Definition: CompletionRequest.h:167
CommandInterpreter.h
lldb_private::FileSpec::GetDirectory
ConstString & GetDirectory()
Directory string get accessor.
Definition: FileSpec.cpp:335
lldb_private::CommandInterpreter::GetExecutionContext
ExecutionContext GetExecutionContext() const
lldb_private::Searcher
General Outline: Provides the callback and search depth for the SearchFilter search.
Definition: SearchFilter.h:42
lldb_private::CommandCompletions::eSettingsNameCompletion
@ eSettingsNameCompletion
Definition: CommandCompletions.h:33
lldb_private::CommandCompletions::FrameIndexes
static void FrameIndexes(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:714
lldb_private::CompletionResult
Definition: CompletionRequest.h:38
lldb_private::CommandCompletions::ProcessIDs
static void ProcessIDs(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:677
lldb_private::CommandCompletions::eArchitectureCompletion
@ eArchitectureCompletion
Definition: CommandCompletions.h:35
lldb_private::CommandCompletions::DisassemblyFlavors
static void DisassemblyFlavors(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:666
Variable.h
PATH_MAX
#define PATH_MAX
Definition: windows/PosixApi.h:25
lldb_private::Language::GetNameForLanguageType
static const char * GetNameForLanguageType(lldb::LanguageType language)
Definition: Language.cpp:217
lldb_private::CommandCompletions::eThreadIndexCompletion
@ eThreadIndexCompletion
Definition: CommandCompletions.h:45
lldb_private::ProcessInstanceInfoList
std::vector< ProcessInstanceInfo > ProcessInstanceInfoList
Definition: Host.h:30
lldb_private::ExecutionContext::HasProcessScope
bool HasProcessScope() const
Returns true the ExecutionContext object contains a valid target and process.
Definition: ExecutionContext.cpp:385
RegisterContext.h
lldb_private::FileSpec::GetFilename
ConstString & GetFilename()
Filename string get accessor.
Definition: FileSpec.cpp:341
lldb_private::CommandCompletions::eDiskFileCompletion
@ eDiskFileCompletion
Definition: CommandCompletions.h:29
lldb_private::ExecutionContext::GetTargetPtr
Target * GetTargetPtr() const
Returns a pointer to the target object.
Definition: ExecutionContext.cpp:200
lldb_private::TildeExpressionResolver
Definition: TildeExpressionResolver.h:20
CommandCompletions.h
lldb::eDescriptionLevelInitial
@ eDescriptionLevelInitial
Definition: lldb-enumerations.h:211
lldb::eDescriptionLevelBrief
@ eDescriptionLevelBrief
Definition: lldb-enumerations.h:208
lldb_private::CompletionRequest
Definition: CompletionRequest.h:100
lldb_private::Searcher::eCallbackReturnContinue
@ eCallbackReturnContinue
Definition: SearchFilter.h:46
lldb_private::CommandCompletions::eSymbolCompletion
@ eSymbolCompletion
Definition: CommandCompletions.h:31