1 //===-- SBModuleSpec.h ------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBModuleSpec_h_
11 #define LLDB_SBModuleSpec_h_
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/API/SBFileSpec.h"
18 class LLDB_API SBModuleSpec {
22 SBModuleSpec(const SBModuleSpec &rhs);
26 const SBModuleSpec &operator=(const SBModuleSpec &rhs);
32 //------------------------------------------------------------------
33 /// Get const accessor for the module file.
35 /// This function returns the file for the module on the host system
36 /// that is running LLDB. This can differ from the path on the
37 /// platform since we might be doing remote debugging.
40 /// A const reference to the file specification object.
41 //------------------------------------------------------------------
42 lldb::SBFileSpec GetFileSpec();
44 void SetFileSpec(const lldb::SBFileSpec &fspec);
46 //------------------------------------------------------------------
47 /// Get accessor for the module platform file.
49 /// Platform file refers to the path of the module as it is known on
50 /// the remote system on which it is being debugged. For local
51 /// debugging this is always the same as Module::GetFileSpec(). But
52 /// remote debugging might mention a file '/usr/lib/liba.dylib'
53 /// which might be locally downloaded and cached. In this case the
54 /// platform file could be something like:
55 /// '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
56 /// The file could also be cached in a local developer kit directory.
59 /// A const reference to the file specification object.
60 //------------------------------------------------------------------
61 lldb::SBFileSpec GetPlatformFileSpec();
63 void SetPlatformFileSpec(const lldb::SBFileSpec &fspec);
65 lldb::SBFileSpec GetSymbolFileSpec();
67 void SetSymbolFileSpec(const lldb::SBFileSpec &fspec);
69 const char *GetObjectName();
71 void SetObjectName(const char *name);
73 const char *GetTriple();
75 void SetTriple(const char *triple);
77 const uint8_t *GetUUIDBytes();
79 size_t GetUUIDLength();
81 bool SetUUIDBytes(const uint8_t *uuid, size_t uuid_len);
83 bool GetDescription(lldb::SBStream &description);
86 friend class SBModuleSpecList;
87 friend class SBModule;
88 friend class SBTarget;
90 std::unique_ptr<lldb_private::ModuleSpec> m_opaque_ap;
93 class SBModuleSpecList {
97 SBModuleSpecList(const SBModuleSpecList &rhs);
101 SBModuleSpecList &operator=(const SBModuleSpecList &rhs);
103 static SBModuleSpecList GetModuleSpecifications(const char *path);
105 void Append(const SBModuleSpec &spec);
107 void Append(const SBModuleSpecList &spec_list);
109 SBModuleSpec FindFirstMatchingSpec(const SBModuleSpec &match_spec);
111 SBModuleSpecList FindMatchingSpecs(const SBModuleSpec &match_spec);
115 SBModuleSpec GetSpecAtIndex(size_t i);
117 bool GetDescription(lldb::SBStream &description);
120 std::unique_ptr<lldb_private::ModuleSpecList> m_opaque_ap;
125 #endif // LLDB_SBModuleSpec_h_