2013-08-23 13:46:38 -04:00
|
|
|
//===-- CommandObjectScript.h -----------------------------------*- C++ -*-===//
|
|
|
|
|
//
|
2019-08-20 16:51:52 -04:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2013-08-23 13:46:38 -04:00
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
#ifndef LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
|
|
|
|
|
#define LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
|
2013-08-23 13:46:38 -04:00
|
|
|
|
|
|
|
|
#include "lldb/Interpreter/CommandObject.h"
|
|
|
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
class CommandObjectScript : public CommandObjectRaw {
|
2013-08-23 13:46:38 -04:00
|
|
|
public:
|
2021-02-16 15:13:02 -05:00
|
|
|
CommandObjectScript(CommandInterpreter &interpreter);
|
2017-01-02 14:26:05 -05:00
|
|
|
~CommandObjectScript() override;
|
2021-02-16 15:13:02 -05:00
|
|
|
Options *GetOptions() override { return &m_options; }
|
|
|
|
|
|
|
|
|
|
class CommandOptions : public Options {
|
|
|
|
|
public:
|
|
|
|
|
CommandOptions() : Options() {}
|
|
|
|
|
~CommandOptions() override = default;
|
|
|
|
|
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
|
|
|
|
|
ExecutionContext *execution_context) override;
|
|
|
|
|
void OptionParsingStarting(ExecutionContext *execution_context) override;
|
|
|
|
|
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
|
|
|
|
|
lldb::ScriptLanguage language = lldb::eScriptLanguageNone;
|
|
|
|
|
};
|
2013-08-23 13:46:38 -04:00
|
|
|
|
|
|
|
|
protected:
|
2018-07-28 07:09:23 -04:00
|
|
|
bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
|
2021-02-16 15:13:02 -05:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
CommandOptions m_options;
|
2013-08-23 13:46:38 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace lldb_private
|
|
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
#endif // LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
|