1
- // ===-- CommandObjectScript .cpp --- ----------------------------------------===//
1
+ // ===-- CommandObjectScripting .cpp ----------------------------------------===//
2
2
//
3
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
4
// See https://llvm.org/LICENSE.txt for license information.
5
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- #include " CommandObjectScript .h"
9
+ #include " CommandObjectScripting .h"
10
10
#include " lldb/Core/Debugger.h"
11
11
#include " lldb/DataFormatters/DataVisualization.h"
12
12
#include " lldb/Host/Config.h"
21
21
using namespace lldb ;
22
22
using namespace lldb_private ;
23
23
24
- #define LLDB_OPTIONS_script
24
+ #define LLDB_OPTIONS_scripting_execute
25
25
#include " CommandOptions.inc"
26
26
27
- Status CommandObjectScript ::CommandOptions::SetOptionValue (
27
+ Status CommandObjectScriptingExecute ::CommandOptions::SetOptionValue (
28
28
uint32_t option_idx, llvm::StringRef option_arg,
29
29
ExecutionContext *execution_context) {
30
30
Status error;
@@ -46,27 +46,29 @@ Status CommandObjectScript::CommandOptions::SetOptionValue(
46
46
return error;
47
47
}
48
48
49
- void CommandObjectScript ::CommandOptions::OptionParsingStarting (
49
+ void CommandObjectScriptingExecute ::CommandOptions::OptionParsingStarting (
50
50
ExecutionContext *execution_context) {
51
51
language = lldb::eScriptLanguageNone;
52
52
}
53
53
54
54
llvm::ArrayRef<OptionDefinition>
55
- CommandObjectScript ::CommandOptions::GetDefinitions () {
56
- return llvm::ArrayRef (g_script_options );
55
+ CommandObjectScriptingExecute ::CommandOptions::GetDefinitions () {
56
+ return llvm::ArrayRef (g_scripting_execute_options );
57
57
}
58
58
59
- CommandObjectScript::CommandObjectScript (CommandInterpreter &interpreter)
59
+ CommandObjectScriptingExecute::CommandObjectScriptingExecute (
60
+ CommandInterpreter &interpreter)
60
61
: CommandObjectRaw(
61
- interpreter, " script " ,
62
+ interpreter, " scripting execute " ,
62
63
" Invoke the script interpreter with provided code and display any "
63
64
" results. Start the interactive interpreter if no code is supplied." ,
64
- " script [--language <scripting-language> --] [<script-code>]" ) {}
65
+ " scripting execute [--language <scripting-language> --] "
66
+ " [<script-code>]" ) {}
65
67
66
- CommandObjectScript ::~CommandObjectScript () = default ;
68
+ CommandObjectScriptingExecute ::~CommandObjectScriptingExecute () = default ;
67
69
68
- void CommandObjectScript ::DoExecute (llvm::StringRef command,
69
- CommandReturnObject &result) {
70
+ void CommandObjectScriptingExecute ::DoExecute (llvm::StringRef command,
71
+ CommandReturnObject &result) {
70
72
// Try parsing the language option but when the command contains a raw part
71
73
// separated by the -- delimiter.
72
74
OptionsWithRaw raw_args (command);
@@ -111,3 +113,19 @@ void CommandObjectScript::DoExecute(llvm::StringRef command,
111
113
else
112
114
result.SetStatus (eReturnStatusFailed);
113
115
}
116
+
117
+ #pragma mark CommandObjectMultiwordScripting
118
+
119
+ // CommandObjectMultiwordScripting
120
+
121
+ CommandObjectMultiwordScripting::CommandObjectMultiwordScripting (
122
+ CommandInterpreter &interpreter)
123
+ : CommandObjectMultiword(
124
+ interpreter, " scripting" ,
125
+ " Commands for operating on the scripting functionnalities." ,
126
+ " scripting <subcommand> [<subcommand-options>]" ) {
127
+ LoadSubCommand (" execute" , CommandObjectSP (new CommandObjectScriptingExecute (
128
+ interpreter)));
129
+ }
130
+
131
+ CommandObjectMultiwordScripting::~CommandObjectMultiwordScripting () = default ;
0 commit comments