LanguageRuntime.h revision 10de7d1db3ec782ea2ccda1f39c0a40b9c301594
1//===-- LanguageRuntime.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_LanguageRuntime_h_ 11#define liblldb_LanguageRuntime_h_ 12 13// C Includes 14// C++ Includes 15// Other libraries and framework includes 16// Project includes 17#include "lldb/lldb-public.h" 18#include "lldb/Core/PluginInterface.h" 19#include "lldb/lldb-private.h" 20#include "lldb/Core/ValueObject.h" 21#include "lldb/Core/Value.h" 22#include "lldb/Target/ExecutionContextScope.h" 23 24namespace lldb_private { 25 26class LanguageRuntime : 27 public PluginInterface 28{ 29public: 30 virtual 31 ~LanguageRuntime(); 32 33 static LanguageRuntime* 34 FindPlugin (Process *process, lldb::LanguageType language); 35 36 virtual lldb::LanguageType 37 GetLanguageType () const = 0; 38 39 virtual bool 40 GetObjectDescription (Stream &str, ValueObject &object) = 0; 41 42 virtual bool 43 GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope) = 0; 44 45 virtual bool 46 GetDynamicTypeAndAddress (ValueObject &in_value, 47 lldb::DynamicValueType use_dynamic, 48 TypeAndOrName &class_type_or_name, 49 Address &address) = 0; 50 51 // This should be a fast test to determine whether it is likely that this value would 52 // have a dynamic type. 53 virtual bool 54 CouldHaveDynamicValue (ValueObject &in_value) = 0; 55 56 virtual void 57 SetExceptionBreakpoints () 58 { 59 } 60 61 virtual void 62 ClearExceptionBreakpoints () 63 { 64 } 65 66 virtual bool 67 ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason) 68 { 69 return false; 70 } 71protected: 72 //------------------------------------------------------------------ 73 // Classes that inherit from LanguageRuntime can see and modify these 74 //------------------------------------------------------------------ 75 LanguageRuntime(Process *process); 76 Process *m_process; 77private: 78 DISALLOW_COPY_AND_ASSIGN (LanguageRuntime); 79}; 80 81} // namespace lldb_private 82 83#endif // liblldb_LanguageRuntime_h_ 84