Ryan Brown | 2b56f86 | 2015-10-06 20:31:08 +0000 | [diff] [blame^] | 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/lldb-private.h" |
| 18 | #include "lldb/Breakpoint/BreakpointResolver.h" |
| 19 | #include "lldb/Target/LanguageRuntime.h" |
| 20 | #include "lldb/Core/Value.h" |
| 21 | |
| 22 | namespace lldb_private { |
| 23 | |
| 24 | class GoLanguageRuntime : |
| 25 | public lldb_private::LanguageRuntime |
| 26 | { |
| 27 | public: |
| 28 | ~GoLanguageRuntime() { } |
| 29 | |
| 30 | lldb::LanguageType |
| 31 | GetLanguageType() const override |
| 32 | { |
| 33 | return lldb::eLanguageTypeGo; |
| 34 | } |
| 35 | |
| 36 | bool |
| 37 | GetObjectDescription(Stream &str, ValueObject &object) override |
| 38 | { |
| 39 | // TODO(ribrdb): Maybe call String() method? |
| 40 | return false; |
| 41 | } |
| 42 | |
| 43 | bool |
| 44 | GetObjectDescription(Stream &str, Value &value, ExecutionContextScope *exe_scope) override |
| 45 | { |
| 46 | return false; |
| 47 | } |
| 48 | |
| 49 | bool GetDynamicTypeAndAddress(ValueObject &in_value, lldb::DynamicValueType use_dynamic, |
| 50 | TypeAndOrName &class_type_or_name, Address &address, |
| 51 | Value::ValueType &value_type) override; |
| 52 | |
| 53 | bool CouldHaveDynamicValue(ValueObject &in_value) override; |
| 54 | |
| 55 | lldb::BreakpointResolverSP |
| 56 | CreateExceptionResolver(Breakpoint *bkpt, bool catch_bp, bool throw_bp) override |
| 57 | { |
| 58 | return lldb::BreakpointResolverSP(); |
| 59 | } |
| 60 | |
| 61 | TypeAndOrName FixUpDynamicType(const TypeAndOrName &type_and_or_name, ValueObject &static_value) override; |
| 62 | |
| 63 | //------------------------------------------------------------------ |
| 64 | // Static Functions |
| 65 | //------------------------------------------------------------------ |
| 66 | static void |
| 67 | Initialize(); |
| 68 | |
| 69 | static void |
| 70 | Terminate(); |
| 71 | |
| 72 | static lldb_private::LanguageRuntime * |
| 73 | CreateInstance (Process *process, lldb::LanguageType language); |
| 74 | |
| 75 | static lldb_private::ConstString |
| 76 | GetPluginNameStatic(); |
| 77 | |
| 78 | //------------------------------------------------------------------ |
| 79 | // PluginInterface protocol |
| 80 | //------------------------------------------------------------------ |
| 81 | virtual lldb_private::ConstString |
| 82 | GetPluginName(); |
| 83 | |
| 84 | virtual uint32_t |
| 85 | GetPluginVersion(); |
| 86 | |
| 87 | private: |
| 88 | GoLanguageRuntime(Process *process) : lldb_private::LanguageRuntime(process) { } // Call CreateInstance instead. |
| 89 | }; |
| 90 | |
| 91 | } // namespace lldb_private |
| 92 | |
| 93 | #endif // liblldb_GoLanguageRuntime_h_ |