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 ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason)
75 static lldb::BreakpointSP
76 CreateExceptionBreakpoint (Target &target,
77 lldb::LanguageType language,
80 bool is_internal = false);
82 static lldb::LanguageType
83 GetLanguageTypeFromString (const char *string);
86 GetNameForLanguageType (lldb::LanguageType language);
94 virtual lldb::BreakpointResolverSP
95 CreateExceptionResolver (Breakpoint *bkpt, bool catch_bp, bool throw_bp) = 0;
97 virtual lldb::SearchFilterSP
98 CreateExceptionSearchFilter ();
101 //------------------------------------------------------------------
102 // Classes that inherit from LanguageRuntime can see and modify these
103 //------------------------------------------------------------------
105 LanguageRuntime(Process *process);
108 DISALLOW_COPY_AND_ASSIGN (LanguageRuntime);
111 } // namespace lldb_private
113 #endif // liblldb_LanguageRuntime_h_