blob: 519a3cee36d6a2dc288302f4351f339c341f6a5f [file] [log] [blame]
Eugene Zelenko05e0fc82015-10-22 00:45:41 +00001//===-- ItaniumABILanguageRuntime.h -----------------------------*- C++ -*-===//
Jim Ingham22777012010-09-23 02:01:19 +00002//
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
Eugene Zelenko05e0fc82015-10-22 00:45:41 +000015#include <vector>
16
Jim Ingham22777012010-09-23 02:01:19 +000017// Other libraries and framework includes
18// Project includes
19#include "lldb/lldb-private.h"
Jim Ingham133e0fb2012-03-03 02:05:11 +000020#include "lldb/Breakpoint/BreakpointResolver.h"
Jim Ingham22777012010-09-23 02:01:19 +000021#include "lldb/Target/LanguageRuntime.h"
22#include "lldb/Target/CPPLanguageRuntime.h"
23#include "lldb/Core/Value.h"
24
25namespace lldb_private {
26
27 class ItaniumABILanguageRuntime :
28 public lldb_private::CPPLanguageRuntime
29 {
30 public:
Eugene Zelenko05e0fc82015-10-22 00:45:41 +000031 ~ItaniumABILanguageRuntime() override = default;
Jim Ingham78a685a2011-04-16 00:01:13 +000032
Jim Ingham22777012010-09-23 02:01:19 +000033 //------------------------------------------------------------------
34 // Static Functions
35 //------------------------------------------------------------------
36 static void
37 Initialize();
38
39 static void
40 Terminate();
41
42 static lldb_private::LanguageRuntime *
43 CreateInstance (Process *process, lldb::LanguageType language);
44
Greg Clayton57abc5d2013-05-10 21:47:16 +000045 static lldb_private::ConstString
46 GetPluginNameStatic();
47
Eugene Zelenko05e0fc82015-10-22 00:45:41 +000048 bool
49 IsVTableName(const char *name) override;
50
51 bool
52 GetDynamicTypeAndAddress(ValueObject &in_value,
53 lldb::DynamicValueType use_dynamic,
54 TypeAndOrName &class_type_or_name,
55 Address &address,
56 Value::ValueType &value_type) override;
57
58 TypeAndOrName
59 FixUpDynamicType(const TypeAndOrName& type_and_or_name,
60 ValueObject& static_value) override;
61
62 bool
63 CouldHaveDynamicValue(ValueObject &in_value) override;
64
65 void
66 SetExceptionBreakpoints() override;
67
68 void
69 ClearExceptionBreakpoints() override;
70
71 bool
72 ExceptionBreakpointsAreSet() override;
73
74 bool
75 ExceptionBreakpointsExplainStop(lldb::StopInfoSP stop_reason) override;
76
77 lldb::BreakpointResolverSP
78 CreateExceptionResolver(Breakpoint *bkpt, bool catch_bp, bool throw_bp) override;
79
80 lldb::SearchFilterSP
81 CreateExceptionSearchFilter() override;
82
83 size_t
84 GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates) override;
85
Jim Ingham22777012010-09-23 02:01:19 +000086 //------------------------------------------------------------------
87 // PluginInterface protocol
88 //------------------------------------------------------------------
Eugene Zelenko05e0fc82015-10-22 00:45:41 +000089 lldb_private::ConstString
90 GetPluginName() override;
Jim Ingham22777012010-09-23 02:01:19 +000091
Eugene Zelenko05e0fc82015-10-22 00:45:41 +000092 uint32_t
93 GetPluginVersion() override;
Siva Chandra0f404e02015-04-09 18:48:34 +000094
Greg Claytona4f42232013-03-11 20:02:03 +000095 protected:
Greg Claytonbff78252013-03-11 18:42:51 +000096 lldb::BreakpointResolverSP
Jim Inghamf0fd55e2012-03-06 18:10:38 +000097 CreateExceptionResolver (Breakpoint *bkpt, bool catch_bp, bool throw_bp, bool for_expressions);
98
Greg Claytonbff78252013-03-11 18:42:51 +000099 lldb::BreakpointSP
100 CreateExceptionBreakpoint(bool catch_bp,
101 bool throw_bp,
102 bool for_expressions,
103 bool is_internal);
104
Jim Ingham22777012010-09-23 02:01:19 +0000105 private:
106 ItaniumABILanguageRuntime(Process *process) : lldb_private::CPPLanguageRuntime(process) { } // Call CreateInstance instead.
Sean Callananf2115102010-11-03 22:19:38 +0000107
108 lldb::BreakpointSP m_cxx_exception_bp_sp;
Jim Ingham22777012010-09-23 02:01:19 +0000109 };
110
111} // namespace lldb_private
112
Eugene Zelenko05e0fc82015-10-22 00:45:41 +0000113#endif // liblldb_ItaniumABILanguageRuntime_h_