LLDB mainline
ScriptInterpreterNone.cpp
Go to the documentation of this file.
1//===-- ScriptInterpreterNone.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"
12#include "lldb/Utility/Stream.h"
14
15#include "llvm/Support/Threading.h"
16
17#include <mutex>
18
19using namespace lldb;
20using namespace lldb_private;
21
23
26
28
29static const char *no_interpreter_err_msg =
30 "error: Embedded script interpreter unavailable. LLDB was built without "
31 "scripting language support.\n";
32
33bool ScriptInterpreterNone::ExecuteOneLine(llvm::StringRef command,
35 const ExecuteScriptOptions &) {
37 return false;
38}
39
42}
43
45 static llvm::once_flag g_once_flag;
46
47 llvm::call_once(g_once_flag, []() {
51 });
52}
53
55
58 return std::make_shared<ScriptInterpreterNone>(debugger);
59}
60
62 return "Null script interpreter";
63}
#define LLDB_PLUGIN_DEFINE(PluginName)
Definition: PluginManager.h:31
static const char * no_interpreter_err_msg
A class to manage flag bits.
Definition: Debugger.h:79
StreamFile & GetErrorStream()
Definition: Debugger.h:156
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
bool ExecuteOneLine(llvm::StringRef command, CommandReturnObject *result, const ExecuteScriptOptions &options=ExecuteScriptOptions()) override
static llvm::StringRef GetPluginNameStatic()
static llvm::StringRef GetPluginDescriptionStatic()
static lldb::ScriptInterpreterSP CreateInstance(Debugger &debugger)
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition: Stream.cpp:65
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
Definition: SBAddress.h:15
@ eScriptLanguageNone
std::shared_ptr< lldb_private::ScriptInterpreter > ScriptInterpreterSP
Definition: lldb-forward.h:398