summaryrefslogtreecommitdiff
path: root/include/lldb/Target/LanguageRuntime.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Target/LanguageRuntime.h')
-rw-r--r--include/lldb/Target/LanguageRuntime.h50
1 files changed, 31 insertions, 19 deletions
diff --git a/include/lldb/Target/LanguageRuntime.h b/include/lldb/Target/LanguageRuntime.h
index d8e5ada6c96f..686ec5ea3479 100644
--- a/include/lldb/Target/LanguageRuntime.h
+++ b/include/lldb/Target/LanguageRuntime.h
@@ -29,8 +29,8 @@ class LanguageRuntime :
public PluginInterface
{
public:
- virtual
- ~LanguageRuntime();
+
+ ~LanguageRuntime() override;
static LanguageRuntime*
FindPlugin (Process *process, lldb::LanguageType language);
@@ -52,12 +52,31 @@ public:
GetDynamicTypeAndAddress (ValueObject &in_value,
lldb::DynamicValueType use_dynamic,
TypeAndOrName &class_type_or_name,
- Address &address) = 0;
+ Address &address,
+ Value::ValueType &value_type) = 0;
+
+ // This call should return a CompilerType given a generic type name
+ // and an ExecutionContextScope in which one can actually fetch
+ // any specialization information required.
+ virtual CompilerType
+ GetConcreteType (ExecutionContextScope *exe_scope,
+ ConstString abstract_type_name)
+ {
+ return CompilerType();
+ }
// This should be a fast test to determine whether it is likely that this value would
// have a dynamic type.
virtual bool
CouldHaveDynamicValue (ValueObject &in_value) = 0;
+
+ // The contract for GetDynamicTypeAndAddress() is to return a "bare-bones" dynamic type
+ // For instance, given a Base* pointer, GetDynamicTypeAndAddress() will return the type of
+ // Derived, not Derived*. The job of this API is to correct this misalignment between the
+ // static type and the discovered dynamic type
+ virtual TypeAndOrName
+ FixUpDynamicType (const TypeAndOrName& type_and_or_name,
+ ValueObject& static_value) = 0;
virtual void
SetExceptionBreakpoints ()
@@ -92,24 +111,17 @@ public:
CreateExceptionPrecondition (lldb::LanguageType language,
bool catch_bp,
bool throw_bp);
-
- static lldb::LanguageType
- GetLanguageTypeFromString (const char *string);
-
- static const char *
- GetNameForLanguageType (lldb::LanguageType language);
-
- static void
- PrintAllLanguages (Stream &s, const char *prefix, const char *suffix);
-
- static bool
- LanguageIsCPlusPlus (lldb::LanguageType language);
-
Process *
GetProcess()
{
return m_process;
}
+
+ Target&
+ GetTargetRef()
+ {
+ return m_process->GetTarget();
+ }
virtual lldb::BreakpointResolverSP
CreateExceptionResolver (Breakpoint *bkpt, bool catch_bp, bool throw_bp) = 0;
@@ -118,7 +130,7 @@ public:
CreateExceptionSearchFilter ();
virtual bool
- GetTypeBitSize (const ClangASTType& clang_type,
+ GetTypeBitSize (const CompilerType& compiler_type,
uint64_t &size)
{
return false;
@@ -133,7 +145,6 @@ public:
virtual void
ModulesDidLoad (const ModuleList &module_list)
{
- return;
}
protected:
@@ -144,9 +155,10 @@ protected:
LanguageRuntime(Process *process);
Process *m_process;
private:
+
DISALLOW_COPY_AND_ASSIGN (LanguageRuntime);
};
} // namespace lldb_private
-#endif // liblldb_LanguageRuntime_h_
+#endif // liblldb_LanguageRuntime_h_