LanguageRuntime.h revision ef80aabe53b7fdf61309ba6d3d6865c94c681345
15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//===-- LanguageRuntime.h ---------------------------------------------------*- C++ -*-===//
25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//
35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//                     The LLVM Compiler Infrastructure
45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//
55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// This file is distributed under the University of Illinois Open Source
65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// License. See LICENSE.TXT for details.
75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//===----------------------------------------------------------------------===//
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef liblldb_LanguageRuntime_h_
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define liblldb_LanguageRuntime_h_
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// C Includes
145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// C++ Includes
15// Other libraries and framework includes
16// Project includes
17#include "lldb/lldb-public.h"
18#include "lldb/Core/PluginInterface.h"
19#include "lldb/lldb-private.h"
20#include "lldb/Core/ValueObject.h"
21#include "lldb/Core/Value.h"
22#include "lldb/Target/ExecutionContextScope.h"
23
24namespace lldb_private {
25
26class LanguageRuntime :
27    public PluginInterface
28{
29public:
30    virtual
31    ~LanguageRuntime();
32
33    static LanguageRuntime*
34    FindPlugin (Process *process, lldb::LanguageType language);
35
36    virtual lldb::LanguageType
37    GetLanguageType () const = 0;
38
39    virtual bool
40    GetObjectDescription (Stream &str, ValueObject &object) = 0;
41
42    virtual bool
43    GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope) = 0;
44
45    virtual bool
46    GetDynamicTypeAndAddress (ValueObject &in_value, TypeAndOrName &class_type_or_name, Address &address) = 0;
47
48    // This should be a fast test to determine whether it is likely that this value would
49    // have a dynamic type.
50    virtual bool
51    CouldHaveDynamicValue (ValueObject &in_value) = 0;
52
53    virtual void
54    SetExceptionBreakpoints ()
55    {
56    }
57
58    virtual void
59    ClearExceptionBreakpoints ()
60    {
61    }
62
63    virtual bool
64    ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason)
65    {
66        return false;
67    }
68protected:
69    //------------------------------------------------------------------
70    // Classes that inherit from LanguageRuntime can see and modify these
71    //------------------------------------------------------------------
72    LanguageRuntime(Process *process);
73    Process *m_process;
74private:
75    DISALLOW_COPY_AND_ASSIGN (LanguageRuntime);
76};
77
78} // namespace lldb_private
79
80#endif  // liblldb_LanguageRuntime_h_
81