LLDB mainline
ScriptInterpreterNone.h
Go to the documentation of this file.
1//===-- ScriptInterpreterNone.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_SOURCE_PLUGINS_SCRIPTINTERPRETER_NONE_SCRIPTINTERPRETERNONE_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_NONE_SCRIPTINTERPRETERNONE_H
11
13
14namespace lldb_private {
15
16/// Stands in for a script language without an interpreter, reporting why it
17/// is unavailable.
19public:
21 lldb::ScriptLanguage requested_language);
22
24
25 bool ExecuteOneLine(
26 llvm::StringRef command, CommandReturnObject *result,
27 const ExecuteScriptOptions &options = ExecuteScriptOptions()) override;
28
29 llvm::Error ExecuteInterpreterLoop() override;
30
31 bool LoadScriptingModule(const char *filename,
32 const LoadScriptOptions &options,
34 StructuredData::ObjectSP *module_sp = nullptr,
35 FileSpec extra_search_dir = {},
36 lldb::TargetSP loaded_into_target_sp = {}) override;
37
39 std::vector<std::reference_wrapper<BreakpointOptions>> &options,
40 CommandReturnObject &result) override;
41
42 llvm::Error SetBreakpointCommandCallback(BreakpointOptions &bp_options,
43 const char *callback_text,
44 bool is_callback) override;
45
47 BreakpointOptions &bp_options, const char *function_name,
48 StructuredData::ObjectSP extra_args_sp) override;
49
50 void
51 CollectDataForWatchpointCommandCallback(WatchpointOptions *wp_options,
52 CommandReturnObject &result) override;
53
54 llvm::Error SetWatchpointCommandCallback(WatchpointOptions *wp_options,
55 const char *user_input,
56 bool is_callback) override;
57
58 // Static Functions
59 static void Initialize();
60
61 static void Terminate();
62
64 CreateInstance(Debugger &debugger, lldb::ScriptLanguage requested_language);
65
66 static llvm::StringRef GetPluginNameStatic() { return "script-none"; }
67
68 static llvm::StringRef GetPluginDescriptionStatic();
69
70 // PluginInterface protocol
71 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
72
73private:
74 /// Returns the error recorded for the requested language, or success.
75 llvm::Error GetUnavailableError() const;
76
78};
79
80} // namespace lldb_private
81
82#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_NONE_SCRIPTINTERPRETERNONE_H
static llvm::raw_ostream & error(Stream &strm)
A class to manage flag bits.
Definition Debugger.h:106
A file utility class.
Definition FileSpec.h:56
llvm::StringRef GetPluginName() override
llvm::Error SetBreakpointCommandCallback(BreakpointOptions &bp_options, const char *callback_text, bool is_callback) override
static lldb::ScriptInterpreterSP CreateInstance(Debugger &debugger, lldb::ScriptLanguage requested_language)
llvm::Error GetUnavailableError() const
Returns the error recorded for the requested language, or success.
bool ExecuteOneLine(llvm::StringRef command, CommandReturnObject *result, const ExecuteScriptOptions &options=ExecuteScriptOptions()) override
static llvm::StringRef GetPluginNameStatic()
void CollectDataForWatchpointCommandCallback(WatchpointOptions *wp_options, CommandReturnObject &result) override
llvm::Error SetBreakpointCommandCallbackFunction(BreakpointOptions &bp_options, const char *function_name, StructuredData::ObjectSP extra_args_sp) override
Set a script function as the callback for the breakpoint.
ScriptInterpreterNone(Debugger &debugger, lldb::ScriptLanguage requested_language)
static llvm::StringRef GetPluginDescriptionStatic()
void CollectDataForBreakpointCommandCallback(std::vector< std::reference_wrapper< BreakpointOptions > > &options, CommandReturnObject &result) override
llvm::Error SetWatchpointCommandCallback(WatchpointOptions *wp_options, const char *user_input, bool is_callback) override
Set a one-liner as the callback for the watchpoint.
bool LoadScriptingModule(const char *filename, const LoadScriptOptions &options, lldb_private::Status &error, StructuredData::ObjectSP *module_sp=nullptr, FileSpec extra_search_dir={}, lldb::TargetSP loaded_into_target_sp={}) override
ScriptInterpreter(Debugger &debugger, lldb::ScriptLanguage script_lang)
An error handling class.
Definition Status.h:118
std::shared_ptr< Object > ObjectSP
A class that represents a running process on the host machine.
ScriptLanguage
Script interpreter types.
std::shared_ptr< lldb_private::ScriptInterpreter > ScriptInterpreterSP
std::shared_ptr< lldb_private::Target > TargetSP