]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h
MFC r345805: Unify SCSI_STATUS_BUSY retry handling with other cases.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / LanguageRuntime / Go / GoLanguageRuntime.h
1 //===-- GoLanguageRuntime.h -------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_GoLanguageRuntime_h_
11 #define liblldb_GoLanguageRuntime_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Breakpoint/BreakpointResolver.h"
18 #include "lldb/Core/Value.h"
19 #include "lldb/Target/LanguageRuntime.h"
20 #include "lldb/lldb-private.h"
21
22 namespace lldb_private {
23
24 class GoLanguageRuntime : public lldb_private::LanguageRuntime {
25 public:
26   ~GoLanguageRuntime() override = default;
27
28   //------------------------------------------------------------------
29   // Static Functions
30   //------------------------------------------------------------------
31   static void Initialize();
32
33   static void Terminate();
34
35   static lldb_private::LanguageRuntime *
36   CreateInstance(Process *process, lldb::LanguageType language);
37
38   static lldb_private::ConstString GetPluginNameStatic();
39
40   lldb::LanguageType GetLanguageType() const override {
41     return lldb::eLanguageTypeGo;
42   }
43
44   bool GetObjectDescription(Stream &str, ValueObject &object) override {
45     // TODO(ribrdb): Maybe call String() method?
46     return false;
47   }
48
49   bool GetObjectDescription(Stream &str, Value &value,
50                             ExecutionContextScope *exe_scope) override {
51     return false;
52   }
53
54   bool GetDynamicTypeAndAddress(ValueObject &in_value,
55                                 lldb::DynamicValueType use_dynamic,
56                                 TypeAndOrName &class_type_or_name,
57                                 Address &address,
58                                 Value::ValueType &value_type) override;
59
60   bool CouldHaveDynamicValue(ValueObject &in_value) override;
61
62   lldb::BreakpointResolverSP CreateExceptionResolver(Breakpoint *bkpt,
63                                                      bool catch_bp,
64                                                      bool throw_bp) override {
65     return lldb::BreakpointResolverSP();
66   }
67
68   TypeAndOrName FixUpDynamicType(const TypeAndOrName &type_and_or_name,
69                                  ValueObject &static_value) override;
70
71   //------------------------------------------------------------------
72   // PluginInterface protocol
73   //------------------------------------------------------------------
74   lldb_private::ConstString GetPluginName() override;
75
76   uint32_t GetPluginVersion() override;
77
78 private:
79   GoLanguageRuntime(Process *process)
80       : lldb_private::LanguageRuntime(process) {
81   } // Call CreateInstance instead.
82 };
83
84 } // namespace lldb_private
85
86 #endif // liblldb_GoLanguageRuntime_h_