1 | //===-- ScriptedThreadInterface.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_INTERPRETER_INTERFACES_SCRIPTEDTHREADINTERFACE_H |
10 | #define LLDB_INTERPRETER_INTERFACES_SCRIPTEDTHREADINTERFACE_H |
11 | |
12 | #include "ScriptedInterface.h" |
13 | #include "lldb/Core/StructuredDataImpl.h" |
14 | |
15 | #include "lldb/lldb-private.h" |
16 | |
17 | #include <optional> |
18 | #include <string> |
19 | |
20 | namespace lldb_private { |
21 | class ScriptedThreadInterface : virtual public ScriptedInterface { |
22 | public: |
23 | virtual llvm::Expected<StructuredData::GenericSP> |
24 | CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, |
25 | StructuredData::DictionarySP args_sp, |
26 | StructuredData::Generic *script_obj = nullptr) = 0; |
27 | |
28 | virtual lldb::tid_t GetThreadID() { return LLDB_INVALID_THREAD_ID; } |
29 | |
30 | virtual std::optional<std::string> GetName() { return std::nullopt; } |
31 | |
32 | virtual lldb::StateType GetState() { return lldb::eStateInvalid; } |
33 | |
34 | virtual std::optional<std::string> GetQueue() { return std::nullopt; } |
35 | |
36 | virtual StructuredData::DictionarySP GetStopReason() { return {}; } |
37 | |
38 | virtual StructuredData::ArraySP GetStackFrames() { return {}; } |
39 | |
40 | virtual StructuredData::DictionarySP GetRegisterInfo() { return {}; } |
41 | |
42 | virtual std::optional<std::string> GetRegisterContext() { |
43 | return std::nullopt; |
44 | } |
45 | |
46 | virtual StructuredData::ArraySP GetExtendedInfo() { return {}; } |
47 | }; |
48 | } // namespace lldb_private |
49 | |
50 | #endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDTHREADINTERFACE_H |
51 |