SBModule.h revision e49ec18f1868168c8927ae30a379db176ca8cce3
1//===-- SBModule.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 LLDB_SBModule_h_
11#define LLDB_SBModule_h_
12
13#include "lldb/API/SBDefines.h"
14#include "lldb/API/SBSymbolContext.h"
15
16namespace lldb {
17
18class SBModule
19{
20public:
21
22    SBModule ();
23
24    ~SBModule ();
25
26    bool
27    IsValid () const;
28
29    lldb::SBFileSpec
30    GetFileSpec () const;
31
32    const uint8_t *
33    GetUUIDBytes () const;
34
35#ifndef SWIG
36    bool
37    operator == (const lldb::SBModule &rhs) const;
38
39    bool
40    operator != (const lldb::SBModule &rhs) const;
41
42#endif
43
44    bool
45    ResolveFileAddress (lldb::addr_t vm_addr,
46                        lldb::SBAddress& addr);
47
48    lldb::SBSymbolContext
49    ResolveSymbolContextForAddress (const lldb::SBAddress& addr,
50                                    uint32_t resolve_scope);
51
52    bool
53    GetDescription (lldb::SBStream &description);
54
55private:
56    friend class SBSymbolContext;
57    friend class SBTarget;
58    friend class SBFrame;
59
60    explicit SBModule (const lldb::ModuleSP& module_sp);
61
62    void
63    SetModule (const lldb::ModuleSP& module_sp);
64#ifndef SWIG
65
66    lldb::ModuleSP &
67    operator *();
68
69
70    lldb_private::Module *
71    operator ->();
72
73    const lldb_private::Module *
74    operator ->() const;
75
76    lldb_private::Module *
77    get();
78
79    const lldb_private::Module *
80    get() const;
81
82#endif
83
84    lldb::ModuleSP m_opaque_sp;
85};
86
87
88} // namespace lldb
89
90#endif // LLDB_SBModule_h_
91