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