LLDB mainline
CommandObjectScripting.cpp
Go to the documentation of this file.
1//===-- CommandObjectScripting.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
10#include "lldb/Core/Debugger.h"
13#include "lldb/Host/Config.h"
14#include "lldb/Host/Host.h"
23#include "lldb/Utility/Args.h"
25#include "lldb/Utility/Log.h"
26
27#include "llvm/ADT/StringMap.h"
28
29using namespace lldb;
30using namespace lldb_private;
31
32#define LLDB_OPTIONS_scripting_run
33#include "CommandOptions.inc"
34
36public:
39 interpreter, "scripting run",
40 "Invoke the script interpreter with provided code and display any "
41 "results. Start the interactive interpreter if no code is "
42 "supplied.",
43 "scripting run [--language <scripting-language> --] "
44 "[<script-code>]") {}
45
46 ~CommandObjectScriptingRun() override = default;
47
48 Options *GetOptions() override { return &m_options; }
49
50 class CommandOptions : public Options {
51 public:
52 CommandOptions() = default;
53 ~CommandOptions() override = default;
54 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
55 ExecutionContext *execution_context) override {
57 const int short_option = m_getopt_table[option_idx].val;
58
59 switch (short_option) {
60 case 'l':
62 option_arg, GetDefinitions()[option_idx].enum_values,
64 if (!error.Success())
66 "unrecognized value for language '%s'", option_arg.str().c_str());
67 break;
68 default:
69 llvm_unreachable("Unimplemented option");
70 }
71
72 return error;
73 }
74
75 void OptionParsingStarting(ExecutionContext *execution_context) override {
77 }
78
79 llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
80 return llvm::ArrayRef(g_scripting_run_options);
81 }
82
84 };
85
86protected:
87 void DoExecute(llvm::StringRef command,
88 CommandReturnObject &result) override {
89 // Try parsing the language option but when the command contains a raw part
90 // separated by the -- delimiter.
91 OptionsWithRaw raw_args(command);
92 if (raw_args.HasArgs()) {
93 if (!ParseOptions(raw_args.GetArgs(), result))
94 return;
95 command = raw_args.GetRawPart();
96 }
97
98 lldb::ScriptLanguage language =
100 ? m_interpreter.GetDebugger().GetScriptLanguage()
101 : m_options.language;
102
103 if (language == lldb::eScriptLanguageNone) {
104 result.AppendError(
105 "the script-lang setting is set to none - scripting not available");
106 return;
107 }
108
109 ScriptInterpreter *script_interpreter =
110 GetDebugger().GetScriptInterpreter(true, language);
111
112 if (script_interpreter == nullptr) {
113 result.AppendError("no script interpreter");
114 return;
115 }
116
117 // Script might change Python code we use for formatting. Make sure we keep
118 // up to date with it.
120
121 if (command.empty()) {
122 script_interpreter->ExecuteInterpreterLoop();
124 return;
125 }
126
127 // We can do better when reporting the status of one-liner script execution.
128 if (script_interpreter->ExecuteOneLine(command, &result))
130 else
132 }
133
134private:
136};
137
138#define LLDB_OPTIONS_scripting_extension_list
139#include "CommandOptions.inc"
140
142public:
145 interpreter, "scripting extension list",
146 "List all the available scripting extension templates. ",
147 "scripting extension list [--language <scripting-language> --] "
148 "[--json --] [<extension-name> ...]") {
150 }
151
153
154 Options *GetOptions() override { return &m_options; }
155
156 void
163
164 class CommandOptions : public Options {
165 public:
166 CommandOptions() = default;
167 ~CommandOptions() override = default;
168 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
169 ExecutionContext *execution_context) override {
171 const int short_option = m_getopt_table[option_idx].val;
172
173 switch (short_option) {
174 case 'l':
176 option_arg, GetDefinitions()[option_idx].enum_values,
178 if (!error.Success())
180 "unrecognized value for language '{0}'", option_arg);
181 break;
182 case 'j':
183 m_json_format = true;
184 break;
185 default:
186 llvm_unreachable("Unimplemented option");
187 }
188
189 return error;
190 }
191
192 void OptionParsingStarting(ExecutionContext *execution_context) override {
194 m_json_format = false;
195 }
196
197 llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
198 return llvm::ArrayRef(g_scripting_extension_list_options);
199 }
200
202 bool m_json_format = false;
203 };
204
205protected:
206 void DoExecute(Args &command, CommandReturnObject &result) override {
207 llvm::StringMap<std::vector<size_t>> grouped_by_extension;
208 for (size_t i = 0; i < PluginManager::GetNumScriptedInterfaces(); i++) {
209 lldb::ScriptedExtension extension =
211 if (extension == eScriptedExtensionInvalid)
212 continue;
213
214 llvm::StringLiteral extension_name =
216 if (grouped_by_extension.contains(extension_name))
217 grouped_by_extension[extension_name].push_back(i);
218 else
219 grouped_by_extension[extension_name] = {i};
220 }
221
222 if (command.GetArgumentCount() > 0) {
223 llvm::StringMap<std::vector<size_t>> filtered;
224 for (const Args::ArgEntry &arg : command.entries()) {
225 lldb::ScriptedExtension extension =
227 if (extension == eScriptedExtensionInvalid) {
228 result.AppendErrorWithFormat("no scripted extension named '%s'",
229 arg.c_str());
230 return;
231 }
232 llvm::StringLiteral extension_name =
234 auto it = grouped_by_extension.find(extension_name);
235 if (it != grouped_by_extension.end())
236 filtered[extension_name] = it->second;
237 }
238 grouped_by_extension = std::move(filtered);
239 }
240
241 if (m_options.m_json_format)
242 OutputJsonFormat(grouped_by_extension, result);
243 else
244 OutputTextFormat(grouped_by_extension, result);
245 }
246
247private:
248 static std::string GetSeparator(const Debugger &debugger, bool use_color) {
250 use_color) +
251 std::string(std::min<uint64_t>(debugger.GetTerminalWidth(), 80),
252 '-') +
254 use_color);
255 }
256
257 std::vector<std::string>
258 GetLanguagesForExtension(const std::vector<size_t> &indices) {
259 std::vector<std::string> languages;
260 for (const size_t idx : indices) {
263 if (lang != m_options.m_language)
264 continue;
265 languages.push_back(ScriptInterpreter::LanguageToString(lang));
266 }
267 return languages;
268 }
269
271 const llvm::StringMap<std::vector<size_t>> &grouped_by_extension,
272 CommandReturnObject &result) {
273 llvm::json::Array extensions;
274 for (const auto &extension_pair : grouped_by_extension) {
275 // llvm::json::Value's StringRef constructor does not copy the
276 // underlying characters, so every string handed to the JSON structure
277 // below must be an owned std::string -- otherwise it dangles by the
278 // time the object tree is serialized at the end of this function.
279 llvm::json::Array languages;
280 for (const std::string &lang :
281 GetLanguagesForExtension(extension_pair.second))
282 languages.push_back(lang);
283 if (languages.empty())
284 continue;
285
286 llvm::StringRef desc =
288 extension_pair.second[0]);
291 extension_pair.second[0]);
292
293 llvm::json::Array api_usages;
294 for (llvm::StringRef usage : usages.GetSBAPIUsages())
295 api_usages.push_back(usage.str());
296
297 llvm::json::Array cmd_usages;
298 for (llvm::StringRef usage : usages.GetCommandInterpreterUsages())
299 cmd_usages.push_back(usage.str());
300
301 extensions.push_back(llvm::json::Object{
302 {"name", extension_pair.first().str()},
303 {"description", desc.str()},
304 {"languages", std::move(languages)},
305 {"api_usages", std::move(api_usages)},
306 {"command_interpreter_usages", std::move(cmd_usages)},
307 });
308 }
309
310 std::string str;
311 llvm::raw_string_ostream os(str);
312 os << llvm::formatv("{0:2}", llvm::json::Value(std::move(extensions)));
313 result.AppendMessage(str);
315 }
316
318 const llvm::StringMap<std::vector<size_t>> &grouped_by_extension,
319 CommandReturnObject &result) {
320 Stream &s = result.GetOutputStream();
321 const bool use_color = s.AsRawOstream().colors_enabled();
322 const Debugger &debugger = GetDebugger();
323 auto ansi_code = [use_color](llvm::StringRef code) {
324 return ansi::FormatAnsiTerminalCodes(code, use_color);
325 };
326 const std::string label_prefix = ansi_code(debugger.GetLabelAnsiPrefix());
327 const std::string label_suffix = ansi_code(debugger.GetLabelAnsiSuffix());
328 const std::string title_prefix = ansi_code(debugger.GetTitleAnsiPrefix());
329 const std::string title_suffix = ansi_code(debugger.GetTitleAnsiSuffix());
330 const std::string separator = GetSeparator(debugger, use_color);
331
332 s.PutCString("Available scripted extension templates:");
333
334 auto print_field = [&](llvm::StringRef key, llvm::StringRef value,
335 bool is_title = false) {
336 if (value.empty())
337 return;
338 s.IndentMore();
339 s.Indent();
340 s << label_prefix << key << ": " << label_suffix;
341 if (is_title)
342 s << title_prefix << value << title_suffix;
343 else
344 s << value;
345 s << '\n';
346 s.IndentLess();
347 };
348
349 size_t num_listed_interface = 0;
350 for (const auto &extension_pair : grouped_by_extension) {
351 std::vector<std::string> languages =
352 GetLanguagesForExtension(extension_pair.second);
353 if (languages.empty())
354 continue;
355 num_listed_interface++;
356
357 s.EOL();
358 s << separator;
359 s.EOL();
360
361 llvm::StringRef desc =
363 extension_pair.second[0]);
366 extension_pair.second[0]);
367
368 print_field("Name", extension_pair.first(), /*is_title=*/true);
369 print_field("Description", desc);
370 print_field("Language", llvm::join(languages, ""));
371 usages.Dump(s, ScriptedInterfaceUsages::UsageKind::API, use_color);
373 use_color);
374 }
375
376 if (!num_listed_interface)
377 s << " None\n";
378
380 }
381
382private:
384};
385
386#define LLDB_OPTIONS_scripting_extension_generate
387#include "CommandOptions.inc"
388
390public:
392 : CommandObjectParsed(interpreter, "scripting extension generate",
393 "Generate a scripting extension template. ",
394 "scripting extension generate") {
396 }
397
399
400 Options *GetOptions() override { return &m_options; }
401
402 class CommandOptions : public Options {
403 public:
404 CommandOptions() = default;
405 ~CommandOptions() override = default;
406 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
407 ExecutionContext *execution_context) override {
409 const char short_option =
410 g_scripting_extension_generate_options[option_idx].short_option;
411
412 switch (short_option) {
413 case 'a':
415 break;
416 case 'l':
418 option_arg, GetDefinitions()[option_idx].enum_values,
420 if (!error.Success())
422 "unrecognized value for language '{0}'", option_arg);
423 break;
424 case 'n':
425 m_generated_class_prefix = option_arg.str();
426 break;
427 case 'o':
428 m_output_filepath = option_arg.str();
429 break;
430 case 'e': {
431 bool success;
432 m_open_editor = OptionArgParser::ToBoolean(option_arg, true, &success)
434 : eLazyBoolNo;
435 if (!success)
437 "invalid boolean value for -e: '{0}'", option_arg);
438 } break;
439 default:
440 llvm_unreachable("Unimplemented option");
441 }
442
443 return error;
444 }
445
453
454 llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
455 return llvm::ArrayRef(g_scripting_extension_generate_options);
456 }
457
461 std::string m_output_filepath;
463 };
464
465 void
467 OptionElementVector &opt_element_vector) override {
468 // If `-l <lang>` was already given, complete only extensions available
469 // in that language. Bare `-l` (no value yet) and any parse failures
470 // fall back to language-agnostic completion.
472 llvm::ArrayRef<OptionDefinition> defs = m_options.GetDefinitions();
473 for (const OptionArgElement &elem : opt_element_vector) {
474 if (elem.opt_defs_index < 0 ||
475 static_cast<size_t>(elem.opt_defs_index) >= defs.size())
476 continue;
477 if (defs[elem.opt_defs_index].short_option != 'l' ||
478 elem.opt_arg_pos <= 0)
479 continue;
480 llvm::StringRef value =
481 request.GetParsedLine().GetArgumentAtIndex(elem.opt_arg_pos);
483 auto candidate =
485 value, defs[elem.opt_defs_index].enum_values,
487 if (error.Success())
488 language = candidate;
489 break;
490 }
492 request.GetCursorArgumentPrefix(), request, language);
495 }
496
497protected:
498 void DoExecute(Args &command, CommandReturnObject &result) override {
499 if (command.GetArgumentCount() == 0) {
500 result.SetError(
501 Status::FromErrorString("specify extension name to generate"));
502 return;
503 }
504
505 std::vector<ScriptInterpreter::ExtensionTemplateRequest> extension_requests;
506
507 for (size_t i = 0; i < command.GetArgumentCount(); i++) {
508 llvm::StringRef extension_name = command.GetArgumentAtIndex(i);
509 llvm::SmallVector<llvm::StringRef> extension_components;
510 extension_name.split(extension_components, ".");
511 lldb::ScriptedExtension extension =
512 ScriptInterpreter::StringToExtension(extension_components.back());
513 if (extension == eScriptedExtensionInvalid) {
515 "unknown scripted extension: '{0}'", extension_name));
516 return;
517 }
518 extension_requests.push_back({extension_name, extension_components});
519 }
520
521 lldb::ScriptLanguage language =
523 ? m_interpreter.GetDebugger().GetScriptLanguage()
524 : m_options.m_language;
525
526 if (language == lldb::eScriptLanguageNone) {
527 result.AppendError(
528 "the script-lang setting is set to none - scripting not available");
529 return;
530 }
531
532 ScriptInterpreter *script_interpreter =
533 GetDebugger().GetScriptInterpreter(true, language);
534
535 if (script_interpreter == nullptr) {
536 result.AppendError("no script interpreter");
537 return;
538 }
539
540 auto generated_file_or_err = script_interpreter->GenerateExtensionTemplate(
541 m_options.m_generated_class_prefix, extension_requests,
542 m_options.m_generate_non_abstract_methods, m_options.m_output_filepath);
543 if (!generated_file_or_err) {
544 result.SetError(generated_file_or_err.takeError());
545 return;
546 }
547
548 bool should_open_editor = false;
549 switch (m_options.m_open_editor) {
550 case eLazyBoolYes:
551 should_open_editor = true;
552 break;
553 case eLazyBoolNo:
554 should_open_editor = false;
555 break;
557 should_open_editor = result.GetInteractive();
558 break;
559 }
560
561 if (should_open_editor) {
562 if (llvm::Error err = Host::OpenFileInExternalEditor(
563 "", *generated_file_or_err, 1, true)) {
564 LLDB_LOG_ERROR(GetLog(LLDBLog::Host), std::move(err),
565 "OpenFileInExternalEditor failed: {0}");
566 }
567 }
569 "Generated scripting extension template: {0}",
570 generated_file_or_err->GetPath());
572 }
573
574private:
576};
577
579public:
582 interpreter, "scripting extension",
583 "Commands for operating on the scripting extensions.",
584 "scripting extension [<subcommand-options>]") {
586 "list",
588 LoadSubCommand("generate",
590 interpreter)));
591 }
592
594};
595
597 CommandInterpreter &interpreter)
599 interpreter, "scripting",
600 "Commands for operating on the scripting functionalities.",
601 "scripting <subcommand> [<subcommand-options>]") {
602 LoadSubCommand("run",
604 LoadSubCommand("extension",
606 interpreter)));
607}
608
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG_ERROR(log, error,...)
Definition Log.h:405
CommandObjectMultiwordScriptingExtension(CommandInterpreter &interpreter)
~CommandObjectMultiwordScriptingExtension() override=default
void OptionParsingStarting(ExecutionContext *execution_context) override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
~CommandObjectScriptingExtensionGenerate() override=default
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The default version handles argument definitions that have only one argument type,...
CommandObjectScriptingExtensionGenerate(CommandInterpreter &interpreter)
void DoExecute(Args &command, CommandReturnObject &result) override
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
void OptionParsingStarting(ExecutionContext *execution_context) override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The default version handles argument definitions that have only one argument type,...
void DoExecute(Args &command, CommandReturnObject &result) override
std::vector< std::string > GetLanguagesForExtension(const std::vector< size_t > &indices)
void OutputJsonFormat(const llvm::StringMap< std::vector< size_t > > &grouped_by_extension, CommandReturnObject &result)
~CommandObjectScriptingExtensionList() override=default
void OutputTextFormat(const llvm::StringMap< std::vector< size_t > > &grouped_by_extension, CommandReturnObject &result)
static std::string GetSeparator(const Debugger &debugger, bool use_color)
CommandObjectScriptingExtensionList(CommandInterpreter &interpreter)
void OptionParsingStarting(ExecutionContext *execution_context) override
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
CommandObjectScriptingRun(CommandInterpreter &interpreter)
void DoExecute(llvm::StringRef command, CommandReturnObject &result) override
~CommandObjectScriptingRun() override=default
A command line argument class.
Definition Args.h:33
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
Definition Args.h:120
llvm::ArrayRef< ArgEntry > entries() const
Definition Args.h:132
const char * GetArgumentAtIndex(size_t idx) const
Gets the null-terminated C string argument pointer for the argument at index idx.
Definition Args.cpp:273
static bool InvokeCommonCompletionCallbacks(CommandInterpreter &interpreter, uint32_t completion_mask, lldb_private::CompletionRequest &request, SearchFilter *searcher)
CommandObjectMultiwordScripting(CommandInterpreter &interpreter)
bool LoadSubCommand(llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj) override
CommandObjectMultiword(CommandInterpreter &interpreter, const char *name, const char *help=nullptr, const char *syntax=nullptr, uint32_t flags=0)
CommandObjectParsed(CommandInterpreter &interpreter, const char *name, const char *help=nullptr, const char *syntax=nullptr, uint32_t flags=0)
CommandObjectRaw(CommandInterpreter &interpreter, llvm::StringRef name, llvm::StringRef help="", llvm::StringRef syntax="", uint32_t flags=0)
void AddSimpleArgumentList(lldb::CommandArgumentType arg_type, ArgumentRepetitionType repetition_type=eArgRepeatPlain)
CommandInterpreter & GetCommandInterpreter()
CommandInterpreter & m_interpreter
bool ParseOptions(Args &args, CommandReturnObject &result)
void AppendMessage(llvm::StringRef in_string)
void AppendError(llvm::StringRef in_string)
void SetStatus(lldb::ReturnStatus status)
void AppendErrorWithFormat(const char *format,...) __attribute__((format(printf
void void AppendMessageWithFormatv(const char *format, Args &&...args)
"lldb/Utility/ArgCompletionRequest.h"
llvm::StringRef GetCursorArgumentPrefix() const
A class to manage flag bits.
Definition Debugger.h:100
llvm::StringRef GetLabelAnsiSuffix() const
Definition Debugger.cpp:587
llvm::StringRef GetDividerAnsiPrefix() const
Definition Debugger.cpp:605
uint64_t GetTerminalWidth() const
Definition Debugger.cpp:480
llvm::StringRef GetDividerAnsiSuffix() const
Definition Debugger.cpp:611
llvm::StringRef GetTitleAnsiPrefix() const
Definition Debugger.cpp:593
llvm::StringRef GetTitleAnsiSuffix() const
Definition Debugger.cpp:599
llvm::StringRef GetLabelAnsiPrefix() const
Definition Debugger.cpp:581
ScriptInterpreter * GetScriptInterpreter(bool can_create=true, std::optional< lldb::ScriptLanguage > language={})
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
static llvm::Error OpenFileInExternalEditor(llvm::StringRef editor, const FileSpec &file_spec, uint32_t line_no, bool foreground=false)
A pair of an option list with a 'raw' string as a suffix.
Definition Args.h:319
bool HasArgs() const
Returns true if there are any arguments before the raw suffix.
Definition Args.h:330
Args & GetArgs()
Returns the list of arguments.
Definition Args.h:335
const std::string & GetRawPart() const
Returns the raw suffix part of the parsed string.
Definition Args.h:368
A command line option parsing protocol class.
Definition Options.h:58
std::vector< Option > m_getopt_table
Definition Options.h:198
static void AutoCompleteScriptedExtension(llvm::StringRef partial_name, CompletionRequest &request, lldb::ScriptLanguage language=lldb::eScriptLanguageUnknown)
static lldb::ScriptLanguage GetScriptedInterfaceLanguageAtIndex(uint32_t idx)
static uint32_t GetNumScriptedInterfaces()
static lldb::ScriptedExtension GetScriptedInterfaceExtensionAtIndex(uint32_t idx)
static llvm::StringRef GetScriptedInterfaceDescriptionAtIndex(uint32_t idx)
static ScriptedInterfaceUsages GetScriptedInterfaceUsagesAtIndex(uint32_t idx)
virtual llvm::Expected< FileSpec > GenerateExtensionTemplate(const std::string &name, std::vector< ExtensionTemplateRequest > &extensions, bool generate_non_abstract_methods, std::string output_file)
virtual void ExecuteInterpreterLoop()=0
static llvm::StringLiteral ExtensionToString(lldb::ScriptedExtension extension)
static lldb::ScriptedExtension StringToExtension(llvm::StringRef string)
virtual bool ExecuteOneLine(llvm::StringRef command, CommandReturnObject *result, const ExecuteScriptOptions &options=ExecuteScriptOptions())=0
static std::string LanguageToString(lldb::ScriptLanguage language)
void Dump(Stream &s, UsageKind kind, bool use_color=false) const
const std::vector< llvm::StringRef > & GetCommandInterpreterUsages() const
const std::vector< llvm::StringRef > & GetSBAPIUsages() const
An error handling class.
Definition Status.h:118
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
Definition Status.cpp:106
static Status FromErrorString(const char *str)
Definition Status.h:141
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
Definition Status.h:151
A stream class that can stream formatted output to a file.
Definition Stream.h:28
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
Definition Stream.h:405
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
Definition Stream.cpp:157
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition Stream.cpp:63
size_t EOL()
Output and End of Line character to the stream.
Definition Stream.cpp:155
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
Definition Stream.cpp:204
void IndentMore(unsigned amount=2)
Increment the current indentation level.
Definition Stream.cpp:201
std::string FormatAnsiTerminalCodes(llvm::StringRef format, bool do_color=true)
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition Log.h:338
std::vector< OptionArgElement > OptionElementVector
Definition Options.h:43
@ eScriptedExtensionCompletion
ScriptLanguage
Script interpreter types.
@ eScriptLanguageUnknown
@ eScriptLanguageDefault
@ eScriptLanguageNone
ScriptedExtension
Scripting extension types.
@ eScriptedExtensionInvalid
std::shared_ptr< lldb_private::CommandObject > CommandObjectSP
@ eReturnStatusFailed
@ eReturnStatusSuccessFinishResult
@ eReturnStatusSuccessFinishNoResult
@ eArgTypeScriptedExtension
static int64_t ToOptionEnum(llvm::StringRef s, const OptionEnumValues &enum_values, int32_t fail_value, Status &error)
static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr)