1 //===-- ItaniumABILanguageRuntime.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_ItaniumABILanguageRuntime_h_
11 #define liblldb_ItaniumABILanguageRuntime_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/Target/CPPLanguageRuntime.h"
21 #include "lldb/Core/Value.h"
22 
23 namespace lldb_private {
24 
25     class ItaniumABILanguageRuntime :
26     public lldb_private::CPPLanguageRuntime
27     {
28     public:
~ItaniumABILanguageRuntime()29         ~ItaniumABILanguageRuntime() { }
30 
31         virtual bool
32         IsVTableName (const char *name);
33 
34         virtual bool
35         GetDynamicTypeAndAddress (ValueObject &in_value,
36                                   lldb::DynamicValueType use_dynamic,
37                                   TypeAndOrName &class_type_or_name,
38                                   Address &address);
39 
40         virtual bool
41         CouldHaveDynamicValue (ValueObject &in_value);
42 
43         //------------------------------------------------------------------
44         // Static Functions
45         //------------------------------------------------------------------
46         static void
47         Initialize();
48 
49         static void
50         Terminate();
51 
52         static lldb_private::LanguageRuntime *
53         CreateInstance (Process *process, lldb::LanguageType language);
54 
55         static lldb_private::ConstString
56         GetPluginNameStatic();
57 
58         //------------------------------------------------------------------
59         // PluginInterface protocol
60         //------------------------------------------------------------------
61         virtual lldb_private::ConstString
62         GetPluginName();
63 
64         virtual uint32_t
65         GetPluginVersion();
66 
67         virtual void
68         SetExceptionBreakpoints ();
69 
70         virtual void
71         ClearExceptionBreakpoints ();
72 
73         virtual bool
74         ExceptionBreakpointsAreSet ();
75 
76         virtual bool
77         ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason);
78 
79         virtual lldb::BreakpointResolverSP
80         CreateExceptionResolver (Breakpoint *bkpt, bool catch_bp, bool throw_bp);
81 
82         virtual lldb::SearchFilterSP
83         CreateExceptionSearchFilter ();
84 
85     protected:
86 
87         lldb::BreakpointResolverSP
88         CreateExceptionResolver (Breakpoint *bkpt, bool catch_bp, bool throw_bp, bool for_expressions);
89 
90         lldb::BreakpointSP
91         CreateExceptionBreakpoint(bool catch_bp,
92                                   bool throw_bp,
93                                   bool for_expressions,
94                                   bool is_internal);
95 
96     private:
ItaniumABILanguageRuntime(Process * process)97         ItaniumABILanguageRuntime(Process *process) : lldb_private::CPPLanguageRuntime(process) { } // Call CreateInstance instead.
98 
99         lldb::BreakpointSP                              m_cxx_exception_bp_sp;
100     };
101 
102 } // namespace lldb_private
103 
104 #endif  // liblldb_ItaniumABILanguageRuntime_h_
105