LLDB  mainline
CommandCompletions.h
Go to the documentation of this file.
1 //===-- CommandCompletions.h ------------------------------------*- C++ -*-===//
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 #ifndef LLDB_INTERPRETER_COMMANDCOMPLETIONS_H
10 #define LLDB_INTERPRETER_COMMANDCOMPLETIONS_H
11 
12 #include <set>
13 
14 #include "lldb/Core/FileSpecList.h"
15 #include "lldb/Core/SearchFilter.h"
18 #include "lldb/lldb-private.h"
19 
20 #include "llvm/ADT/Twine.h"
21 
22 namespace lldb_private {
23 class TildeExpressionResolver;
25 public:
28  eSourceFileCompletion = (1u << 0),
29  eDiskFileCompletion = (1u << 1),
31  eSymbolCompletion = (1u << 3),
32  eModuleCompletion = (1u << 4),
37  eRegisterCompletion = (1u << 9),
38  eBreakpointCompletion = (1u << 10),
42  eFrameIndexCompletion = (1u << 14),
43  eModuleUUIDCompletion = (1u << 15),
44  eStopHookIDCompletion = (1u << 16),
45  eThreadIndexCompletion = (1u << 17),
48  eProcessIDCompletion = (1u << 20),
49  eProcessNameCompletion = (1u << 21),
53  // This item serves two purposes. It is the last element in the enum, so
54  // you can add custom enums starting from here in your Option class. Also
55  // if you & in this bit the base code will not process the option.
56  eCustomCompletion = (1u << 24)
57  };
58 
60  CommandInterpreter &interpreter, uint32_t completion_mask,
61  lldb_private::CompletionRequest &request, SearchFilter *searcher);
62 
63  // These are the generic completer functions:
64  static void DiskFiles(CommandInterpreter &interpreter,
65  CompletionRequest &request, SearchFilter *searcher);
66 
67  static void DiskFiles(const llvm::Twine &partial_file_name,
68  StringList &matches, TildeExpressionResolver &Resolver);
69 
70  static void DiskDirectories(CommandInterpreter &interpreter,
71  CompletionRequest &request,
72  SearchFilter *searcher);
73 
74  static void DiskDirectories(const llvm::Twine &partial_file_name,
75  StringList &matches,
76  TildeExpressionResolver &Resolver);
77 
78  static void RemoteDiskFiles(CommandInterpreter &interpreter,
79  CompletionRequest &request,
80  SearchFilter *searcher);
81 
82  static void RemoteDiskDirectories(CommandInterpreter &interpreter,
83  CompletionRequest &request,
84  SearchFilter *searcher);
85 
86  static void SourceFiles(CommandInterpreter &interpreter,
87  CompletionRequest &request, SearchFilter *searcher);
88 
89  static void Modules(CommandInterpreter &interpreter,
90  CompletionRequest &request, SearchFilter *searcher);
91 
92  static void ModuleUUIDs(CommandInterpreter &interpreter,
93  CompletionRequest &request, SearchFilter *searcher);
94 
95  static void Symbols(CommandInterpreter &interpreter,
96  CompletionRequest &request, SearchFilter *searcher);
97 
98  static void SettingsNames(CommandInterpreter &interpreter,
99  CompletionRequest &request, SearchFilter *searcher);
100 
101  static void PlatformPluginNames(CommandInterpreter &interpreter,
102  CompletionRequest &request,
103  SearchFilter *searcher);
104 
105  static void ArchitectureNames(CommandInterpreter &interpreter,
106  CompletionRequest &request,
107  SearchFilter *searcher);
108 
109  static void VariablePath(CommandInterpreter &interpreter,
110  CompletionRequest &request, SearchFilter *searcher);
111 
112  static void Registers(CommandInterpreter &interpreter,
113  CompletionRequest &request, SearchFilter *searcher);
114 
115  static void Breakpoints(CommandInterpreter &interpreter,
116  CompletionRequest &request, SearchFilter *searcher);
117 
118  static void BreakpointNames(CommandInterpreter &interpreter,
119  CompletionRequest &request,
120  SearchFilter *searcher);
121 
122  static void ProcessPluginNames(CommandInterpreter &interpreter,
123  CompletionRequest &request,
124  SearchFilter *searcher);
125 
126  static void ProcessIDs(CommandInterpreter &interpreter,
127  CompletionRequest &request, SearchFilter *searcher);
128 
129  static void ProcessNames(CommandInterpreter &interpreter,
130  CompletionRequest &request, SearchFilter *searcher);
131 
132  static void DisassemblyFlavors(CommandInterpreter &interpreter,
133  CompletionRequest &request,
134  SearchFilter *searcher);
135 
136  static void TypeLanguages(CommandInterpreter &interpreter,
137  CompletionRequest &request, SearchFilter *searcher);
138 
139  static void FrameIndexes(CommandInterpreter &interpreter,
140  CompletionRequest &request, SearchFilter *searcher);
141 
142  static void StopHookIDs(CommandInterpreter &interpreter,
143  CompletionRequest &request, SearchFilter *searcher);
144 
145  static void ThreadIndexes(CommandInterpreter &interpreter,
146  CompletionRequest &request, SearchFilter *searcher);
147 
148  static void WatchPointIDs(CommandInterpreter &interpreter,
149  CompletionRequest &request, SearchFilter *searcher);
150 
151  static void TypeCategoryNames(CommandInterpreter &interpreter,
152  CompletionRequest &request,
153  SearchFilter *searcher);
154 };
155 
156 } // namespace lldb_private
157 
158 #endif // LLDB_INTERPRETER_COMMANDCOMPLETIONS_H
RegularExpression.h
lldb_private::CommandCompletions::ePlatformPluginCompletion
@ ePlatformPluginCompletion
Definition: CommandCompletions.h:34
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::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::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::CommandCompletions::RemoteDiskFiles
static void RemoteDiskFiles(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:494
lldb_private::CommandCompletions::eModuleUUIDCompletion
@ eModuleUUIDCompletion
Definition: CommandCompletions.h:43
lldb_private::CommandCompletions::eProcessNameCompletion
@ eProcessNameCompletion
Definition: CommandCompletions.h:49
lldb_private::CommandCompletions::CommonCompletionTypes
CommonCompletionTypes
Definition: CommandCompletions.h:26
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::CommandCompletions::SettingsNames
static void SettingsNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:558
lldb_private::CommandCompletions::eTypeCategoryNameCompletion
@ eTypeCategoryNameCompletion
Definition: CommandCompletions.h:52
CompletionRequest.h
lldb_private::CommandCompletions::SourceFiles
static void SourceFiles(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:303
lldb_private::CommandCompletions::eFrameIndexCompletion
@ eFrameIndexCompletion
Definition: CommandCompletions.h:42
lldb_private::CommandCompletions::eCustomCompletion
@ eCustomCompletion
Definition: CommandCompletions.h:56
lldb_private::CommandCompletions::eWatchPointIDCompletion
@ eWatchPointIDCompletion
Definition: CommandCompletions.h:46
lldb_private::CommandCompletions::eSourceFileCompletion
@ eSourceFileCompletion
Definition: CommandCompletions.h:28
lldb_private::CommandCompletions::eBreakpointCompletion
@ eBreakpointCompletion
Definition: CommandCompletions.h:38
lldb_private::CommandCompletions
Definition: CommandCompletions.h:24
lldb_private::CommandCompletions::eStopHookIDCompletion
@ eStopHookIDCompletion
Definition: CommandCompletions.h:44
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
SearchFilter.h
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
lldb_private::StringList
Definition: StringList.h:25
FileSpecList.h
lldb_private::CommandCompletions::eModuleCompletion
@ eModuleCompletion
Definition: CommandCompletions.h:32
lldb_private::CommandCompletions::Symbols
static void Symbols(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:544
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:221
lldb_private::CommandCompletions::eRemoteDiskFileCompletion
@ eRemoteDiskFileCompletion
Definition: CommandCompletions.h:50
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
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::CommandCompletions::ThreadIndexes
static void ThreadIndexes(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:752
lldb-private.h
lldb_private::CommandCompletions::eDiskDirectoryCompletion
@ eDiskDirectoryCompletion
Definition: CommandCompletions.h:30
lldb_private::CommandCompletions::eDisassemblyFlavorCompletion
@ eDisassemblyFlavorCompletion
Definition: CommandCompletions.h:40
lldb_private::CommandCompletions::eBreakpointNameCompletion
@ eBreakpointNameCompletion
Definition: CommandCompletions.h:47
uint32_t
lldb_private::CommandCompletions::Registers
static void Registers(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:598
lldb_private::CommandCompletions::TypeLanguages
static void TypeLanguages(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:704
lldb_private::CommandCompletions::Modules
static void Modules(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:512
lldb_private::CommandCompletions::ArchitectureNames
static void ArchitectureNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:586
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::CommandCompletions::TypeCategoryNames
static void TypeCategoryNames(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:787
lldb_private::CommandCompletions::StopHookIDs
static void StopHookIDs(CommandInterpreter &interpreter, CompletionRequest &request, SearchFilter *searcher)
Definition: CommandCompletions.cpp:731
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::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
lldb_private::CommandCompletions::eThreadIndexCompletion
@ eThreadIndexCompletion
Definition: CommandCompletions.h:45
lldb_private::CommandCompletions::eDiskFileCompletion
@ eDiskFileCompletion
Definition: CommandCompletions.h:29
lldb_private::TildeExpressionResolver
Definition: TildeExpressionResolver.h:20
lldb_private::CompletionRequest
Definition: CompletionRequest.h:100
lldb_private::CommandCompletions::eSymbolCompletion
@ eSymbolCompletion
Definition: CommandCompletions.h:31