1 //===-- LanguageRuntime.h ---------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_LanguageRuntime_h_
11 #define liblldb_LanguageRuntime_h_
15 // Other libraries and framework includes
17 #include "lldb/lldb-public.h"
18 #include "lldb/Breakpoint/BreakpointResolver.h"
19 #include "lldb/Breakpoint/BreakpointResolverName.h"
20 #include "lldb/Core/PluginInterface.h"
21 #include "lldb/lldb-private.h"
22 #include "lldb/Core/ValueObject.h"
23 #include "lldb/Core/Value.h"
24 #include "lldb/Target/ExecutionContextScope.h"
26 namespace lldb_private {
28 class LanguageRuntime :
29 public PluginInterface
35 static LanguageRuntime*
36 FindPlugin (Process *process, lldb::LanguageType language);
38 virtual lldb::LanguageType
39 GetLanguageType () const = 0;
42 GetObjectDescription (Stream &str, ValueObject &object) = 0;
45 GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope) = 0;
47 // this call should return true if it could set the name and/or the type
49 GetDynamicTypeAndAddress (ValueObject &in_value,
50 lldb::DynamicValueType use_dynamic,
51 TypeAndOrName &class_type_or_name,
52 Address &address) = 0;
54 // This should be a fast test to determine whether it is likely that this value would
55 // have a dynamic type.
57 CouldHaveDynamicValue (ValueObject &in_value) = 0;
60 SetExceptionBreakpoints ()
65 ClearExceptionBreakpoints ()
70 ExceptionBreakpointsAreSet ()
76 ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason)
81 static lldb::BreakpointSP
82 CreateExceptionBreakpoint (Target &target,
83 lldb::LanguageType language,
86 bool is_internal = false);
88 static lldb::LanguageType
89 GetLanguageTypeFromString (const char *string);
92 GetNameForLanguageType (lldb::LanguageType language);
100 virtual lldb::BreakpointResolverSP
101 CreateExceptionResolver (Breakpoint *bkpt, bool catch_bp, bool throw_bp) = 0;
103 virtual lldb::SearchFilterSP
104 CreateExceptionSearchFilter ();
107 //------------------------------------------------------------------
108 // Classes that inherit from LanguageRuntime can see and modify these
109 //------------------------------------------------------------------
111 LanguageRuntime(Process *process);
114 DISALLOW_COPY_AND_ASSIGN (LanguageRuntime);
117 } // namespace lldb_private
119 #endif // liblldb_LanguageRuntime_h_