LLDB  mainline
PlatformRemoteDarwinDevice.cpp
Go to the documentation of this file.
1 //===-- PlatformRemoteDarwinDevice.cpp ------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
12 #include "lldb/Core/Module.h"
13 #include "lldb/Core/ModuleList.h"
14 #include "lldb/Core/ModuleSpec.h"
16 #include "lldb/Host/FileSystem.h"
17 #include "lldb/Host/Host.h"
18 #include "lldb/Host/HostInfo.h"
19 #include "lldb/Target/Process.h"
20 #include "lldb/Target/Target.h"
21 #include "lldb/Utility/FileSpec.h"
22 #include "lldb/Utility/LLDBLog.h"
23 #include "lldb/Utility/Log.h"
24 #include "lldb/Utility/Status.h"
26 
27 using namespace lldb;
28 using namespace lldb_private;
29 
30 PlatformRemoteDarwinDevice::SDKDirectoryInfo::SDKDirectoryInfo(
31  const lldb_private::FileSpec &sdk_dir)
32  : directory(sdk_dir), build(), user_cached(false) {
33  llvm::StringRef dirname_str = sdk_dir.GetFilename().GetStringRef();
34  llvm::StringRef build_str;
35  std::tie(version, build_str) = ParseVersionBuildDir(dirname_str);
36  build.SetString(build_str);
37 }
38 
39 /// Default Constructor
41  : PlatformDarwinDevice(false) {} // This is a remote platform
42 
43 /// Destructor.
44 ///
45 /// The destructor is virtual since this class is designed to be
46 /// inherited from by the plug-in instance.
48 
50  Platform::GetStatus(strm);
51  const char *sdk_directory = GetDeviceSupportDirectoryForOSVersion();
52  if (sdk_directory)
53  strm.Printf(" SDK Path: \"%s\"\n", sdk_directory);
54  else
55  strm.PutCString(" SDK Path: error: unable to locate SDK\n");
56 
57  const uint32_t num_sdk_infos = m_sdk_directory_infos.size();
58  for (uint32_t i = 0; i < num_sdk_infos; ++i) {
59  const SDKDirectoryInfo &sdk_dir_info = m_sdk_directory_infos[i];
60  strm.Printf(" SDK Roots: [%2u] \"%s\"\n", i,
61  sdk_dir_info.directory.GetPath().c_str());
62  }
63 }
64 
66  const ModuleSpec &ms, lldb::ModuleSP &exe_module_sp,
67  const FileSpecList *module_search_paths_ptr) {
68  Status error;
69  // Nothing special to do here, just use the actual file and architecture
70 
71  ModuleSpec resolved_module_spec(ms);
72 
73  // Resolve any executable within a bundle on MacOSX
74  // TODO: verify that this handles shallow bundles, if not then implement one
75  // ourselves
76  Host::ResolveExecutableInBundle(resolved_module_spec.GetFileSpec());
77 
78  if (FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec())) {
79  if (resolved_module_spec.GetArchitecture().IsValid() ||
80  resolved_module_spec.GetUUID().IsValid()) {
81  error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
82  nullptr, nullptr, nullptr);
83 
84  if (exe_module_sp && exe_module_sp->GetObjectFile())
85  return error;
86  exe_module_sp.reset();
87  }
88  // No valid architecture was specified or the exact ARM slice wasn't found
89  // so ask the platform for the architectures that we should be using (in
90  // the correct order) and see if we can find a match that way
91  StreamString arch_names;
92  llvm::ListSeparator LS;
93  ArchSpec process_host_arch;
94  for (const ArchSpec &arch : GetSupportedArchitectures(process_host_arch)) {
95  resolved_module_spec.GetArchitecture() = arch;
96  error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
97  nullptr, nullptr, nullptr);
98  // Did we find an executable using one of the
99  if (error.Success()) {
100  if (exe_module_sp && exe_module_sp->GetObjectFile())
101  break;
102  else
103  error.SetErrorToGenericError();
104  }
105 
106  arch_names << LS << arch.GetArchitectureName();
107  }
108 
109  if (error.Fail() || !exe_module_sp) {
110  if (FileSystem::Instance().Readable(resolved_module_spec.GetFileSpec())) {
111  error.SetErrorStringWithFormatv(
112  "'{0}' doesn't contain any '{1}' platform architectures: {2}",
113  resolved_module_spec.GetFileSpec(), GetPluginName(),
114  arch_names.GetData());
115  } else {
116  error.SetErrorStringWithFormat(
117  "'%s' is not readable",
118  resolved_module_spec.GetFileSpec().GetPath().c_str());
119  }
120  }
121  } else {
122  error.SetErrorStringWithFormat(
123  "'%s' does not exist",
124  resolved_module_spec.GetFileSpec().GetPath().c_str());
125  }
126 
127  return error;
128 }
129 
130 bool PlatformRemoteDarwinDevice::GetFileInSDK(const char *platform_file_path,
131  uint32_t sdk_idx,
132  lldb_private::FileSpec &local_file) {
133  Log *log = GetLog(LLDBLog::Host);
134  if (sdk_idx < m_sdk_directory_infos.size()) {
135  std::string sdkroot_path =
136  m_sdk_directory_infos[sdk_idx].directory.GetPath();
137  local_file.Clear();
138 
139  if (!sdkroot_path.empty() && platform_file_path && platform_file_path[0]) {
140  // We may need to interpose "/Symbols/" or "/Symbols.Internal/" between
141  // the
142  // SDK root directory and the file path.
143 
144  const char *paths_to_try[] = {"Symbols", "", "Symbols.Internal", nullptr};
145  for (size_t i = 0; paths_to_try[i] != nullptr; i++) {
146  local_file.SetFile(sdkroot_path, FileSpec::Style::native);
147  if (paths_to_try[i][0] != '\0')
148  local_file.AppendPathComponent(paths_to_try[i]);
149  local_file.AppendPathComponent(platform_file_path);
150  FileSystem::Instance().Resolve(local_file);
151  if (FileSystem::Instance().Exists(local_file)) {
152  LLDB_LOGF(log, "Found a copy of %s in the SDK dir %s/%s",
153  platform_file_path, sdkroot_path.c_str(), paths_to_try[i]);
154  return true;
155  }
156  local_file.Clear();
157  }
158  }
159  }
160  return false;
161 }
162 
164  const UUID *uuid_ptr,
165  FileSpec &local_file) {
166  Log *log = GetLog(LLDBLog::Host);
167  Status error;
168  char platform_file_path[PATH_MAX];
169  if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path))) {
170  const char *os_version_dir = GetDeviceSupportDirectoryForOSVersion();
171  if (os_version_dir) {
172  std::string resolved_path =
173  (llvm::Twine(os_version_dir) + "/" + platform_file_path).str();
174 
175  local_file.SetFile(resolved_path, FileSpec::Style::native);
176  FileSystem::Instance().Resolve(local_file);
177  if (FileSystem::Instance().Exists(local_file)) {
178  if (log) {
179  LLDB_LOGF(log, "Found a copy of %s in the DeviceSupport dir %s",
180  platform_file_path, os_version_dir);
181  }
182  return error;
183  }
184 
185  resolved_path = (llvm::Twine(os_version_dir) + "/Symbols.Internal/" +
186  platform_file_path)
187  .str();
188 
189  local_file.SetFile(resolved_path, FileSpec::Style::native);
190  FileSystem::Instance().Resolve(local_file);
191  if (FileSystem::Instance().Exists(local_file)) {
192  LLDB_LOGF(
193  log,
194  "Found a copy of %s in the DeviceSupport dir %s/Symbols.Internal",
195  platform_file_path, os_version_dir);
196  return error;
197  }
198  resolved_path =
199  (llvm::Twine(os_version_dir) + "/Symbols/" + platform_file_path)
200  .str();
201 
202  local_file.SetFile(resolved_path, FileSpec::Style::native);
203  FileSystem::Instance().Resolve(local_file);
204  if (FileSystem::Instance().Exists(local_file)) {
205  LLDB_LOGF(log, "Found a copy of %s in the DeviceSupport dir %s/Symbols",
206  platform_file_path, os_version_dir);
207  return error;
208  }
209  }
210  local_file = platform_file;
211  if (FileSystem::Instance().Exists(local_file))
212  return error;
213 
214  error.SetErrorStringWithFormatv(
215  "unable to locate a platform file for '{0}' in platform '{1}'",
216  platform_file_path, GetPluginName());
217  } else {
218  error.SetErrorString("invalid platform file argument");
219  }
220  return error;
221 }
222 
224  const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
225  const FileSpecList *module_search_paths_ptr,
226  llvm::SmallVectorImpl<ModuleSP> *old_modules, bool *did_create_ptr) {
227  // For iOS, the SDK files are all cached locally on the host system. So first
228  // we ask for the file in the cached SDK, then we attempt to get a shared
229  // module for the right architecture with the right UUID.
230  const FileSpec &platform_file = module_spec.GetFileSpec();
231  Log *log = GetLog(LLDBLog::Host);
232 
233  Status error;
234  char platform_file_path[PATH_MAX];
235 
236  if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path))) {
237  ModuleSpec platform_module_spec(module_spec);
238 
240 
241  const uint32_t num_sdk_infos = m_sdk_directory_infos.size();
242 
243  // If we are connected we migth be able to correctly deduce the SDK
244  // directory using the OS build.
245  const uint32_t connected_sdk_idx = GetConnectedSDKIndex();
246  if (connected_sdk_idx < num_sdk_infos) {
247  LLDB_LOGV(log, "Searching for {0} in sdk path {1}", platform_file,
248  m_sdk_directory_infos[connected_sdk_idx].directory);
249  if (GetFileInSDK(platform_file_path, connected_sdk_idx,
250  platform_module_spec.GetFileSpec())) {
251  module_sp.reset();
252  error = ResolveExecutable(platform_module_spec, module_sp, nullptr);
253  if (module_sp) {
254  m_last_module_sdk_idx = connected_sdk_idx;
255  error.Clear();
256  return error;
257  }
258  }
259  }
260 
261  // Try the last SDK index if it is set as most files from an SDK will tend
262  // to be valid in that same SDK.
263  if (m_last_module_sdk_idx < num_sdk_infos) {
264  LLDB_LOGV(log, "Searching for {0} in sdk path {1}", platform_file,
266  if (GetFileInSDK(platform_file_path, m_last_module_sdk_idx,
267  platform_module_spec.GetFileSpec())) {
268  module_sp.reset();
269  error = ResolveExecutable(platform_module_spec, module_sp, nullptr);
270  if (module_sp) {
271  error.Clear();
272  return error;
273  }
274  }
275  }
276 
277  // First try for an exact match of major, minor and update: If a particalar
278  // SDK version was specified via --version or --build, look for a match on
279  // disk.
280  const SDKDirectoryInfo *current_sdk_info =
282  const uint32_t current_sdk_idx =
283  GetSDKIndexBySDKDirectoryInfo(current_sdk_info);
284  if (current_sdk_idx < num_sdk_infos &&
285  current_sdk_idx != m_last_module_sdk_idx) {
286  LLDB_LOGV(log, "Searching for {0} in sdk path {1}", platform_file,
287  m_sdk_directory_infos[current_sdk_idx].directory);
288  if (GetFileInSDK(platform_file_path, current_sdk_idx,
289  platform_module_spec.GetFileSpec())) {
290  module_sp.reset();
291  error = ResolveExecutable(platform_module_spec, module_sp, nullptr);
292  if (module_sp) {
293  m_last_module_sdk_idx = current_sdk_idx;
294  error.Clear();
295  return error;
296  }
297  }
298  }
299 
300  // Second try all SDKs that were found.
301  for (uint32_t sdk_idx = 0; sdk_idx < num_sdk_infos; ++sdk_idx) {
302  if (m_last_module_sdk_idx == sdk_idx) {
303  // Skip the last module SDK index if we already searched it above
304  continue;
305  }
306  LLDB_LOGV(log, "Searching for {0} in sdk path {1}", platform_file,
307  m_sdk_directory_infos[sdk_idx].directory);
308  if (GetFileInSDK(platform_file_path, sdk_idx,
309  platform_module_spec.GetFileSpec())) {
310  // printf ("sdk[%u]: '%s'\n", sdk_idx, local_file.GetPath().c_str());
311 
312  error = ResolveExecutable(platform_module_spec, module_sp, nullptr);
313  if (module_sp) {
314  // Remember the index of the last SDK that we found a file in in case
315  // the wrong SDK was selected.
316  m_last_module_sdk_idx = sdk_idx;
317  error.Clear();
318  return error;
319  }
320  }
321  }
322  }
323  // Not the module we are looking for... Nothing to see here...
324  module_sp.reset();
325 
326  // This may not be an SDK-related module. Try whether we can bring in the
327  // thing to our local cache.
328  error = GetSharedModuleWithLocalCache(module_spec, module_sp,
329  module_search_paths_ptr, old_modules,
330  did_create_ptr);
331  if (error.Success())
332  return error;
333 
334  // See if the file is present in any of the module_search_paths_ptr
335  // directories.
336  if (!module_sp)
338  module_spec, process, module_sp, module_search_paths_ptr, old_modules,
339  did_create_ptr);
340 
341  if (error.Success())
342  return error;
343 
344  const bool always_create = false;
345  error = ModuleList::GetSharedModule(module_spec, module_sp,
346  module_search_paths_ptr, old_modules,
347  did_create_ptr, always_create);
348 
349  if (module_sp)
350  module_sp->SetPlatformFileSpec(platform_file);
351 
352  return error;
353 }
354 
356  if (IsConnected()) {
358  if (llvm::Optional<std::string> build = GetRemoteOSBuildString()) {
359  const uint32_t num_sdk_infos = m_sdk_directory_infos.size();
360  for (uint32_t i = 0; i < num_sdk_infos; ++i) {
361  const SDKDirectoryInfo &sdk_dir_info = m_sdk_directory_infos[i];
362  if (strstr(sdk_dir_info.directory.GetFilename().AsCString(""),
363  build->c_str())) {
365  }
366  }
367  }
368  }
369  } else {
371  }
373 }
374 
376  const SDKDirectoryInfo *sdk_info) {
377  if (sdk_info == nullptr) {
378  return UINT32_MAX;
379  }
380 
381  return sdk_info - &m_sdk_directory_infos[0];
382 }
lldb_private::RemoteAwarePlatform::IsConnected
bool IsConnected() const override
Definition: RemoteAwarePlatform.cpp:344
lldb_private::PlatformDarwinDevice::GetSDKDirectoryForCurrentOSVersion
const SDKDirectoryInfo * GetSDKDirectoryForCurrentOSVersion()
Definition: PlatformDarwinDevice.cpp:147
lldb_private::UUID
Definition: UUID.h:23
lldb_private::Host::ResolveExecutableInBundle
static bool ResolveExecutableInBundle(FileSpec &file)
When executable files may live within a directory, where the directory represents an executable bundl...
Definition: common/Host.cpp:328
lldb_private::ArchSpec
Definition: ArchSpec.h:32
FileSystem.h
lldb_private::PlatformRemoteDarwinDevice::m_connected_module_sdk_idx
uint32_t m_connected_module_sdk_idx
Definition: PlatformRemoteDarwinDevice.h:68
ModuleSpec.h
Host.h
lldb_private::PlatformRemoteDarwinDevice::GetStatus
void GetStatus(Stream &strm) override
Report the current status for this platform.
Definition: PlatformRemoteDarwinDevice.cpp:49
lldb_private::PlatformDarwin::ParseVersionBuildDir
static std::tuple< llvm::VersionTuple, llvm::StringRef > ParseVersionBuildDir(llvm::StringRef str)
Definition: PlatformDarwin.cpp:841
lldb_private::UUID::IsValid
bool IsValid() const
Definition: UUID.h:69
lldb_private::PlatformRemoteDarwinDevice::m_last_module_sdk_idx
uint32_t m_last_module_sdk_idx
Definition: PlatformRemoteDarwinDevice.h:67
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:344
lldb_private::Process
Definition: Process.h:338
Module.h
BreakpointLocation.h
PlatformRemoteDarwinDevice.h
lldb_private::PlatformDarwinDevice::UpdateSDKDirectoryInfosIfNeeded
bool UpdateSDKDirectoryInfosIfNeeded()
Definition: PlatformDarwinDevice.cpp:31
lldb_private::LLDBLog::Host
@ Host
lldb_private::ConstString::AsCString
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
Definition: ConstString.h:192
lldb_private::FileSpec::GetFilename
const ConstString & GetFilename() const
Filename string const get accessor.
Definition: FileSpec.h:239
lldb_private::PlatformRemoteDarwinDevice::PlatformRemoteDarwinDevice
PlatformRemoteDarwinDevice()
Default Constructor.
Definition: PlatformRemoteDarwinDevice.cpp:40
lldb_private::Stream
Definition: Stream.h:28
LLDB_LOGV
#define LLDB_LOGV(log,...)
Definition: Log.h:351
lldb_private::PluginInterface::GetPluginName
virtual llvm::StringRef GetPluginName()=0
lldb_private::PlatformDarwinDevice::m_sdk_directory_infos
SDKDirectoryInfoCollection m_sdk_directory_infos
Definition: PlatformDarwinDevice.h:59
lldb_private::PlatformRemoteDarwinDevice::GetSharedModule
Status GetSharedModule(const ModuleSpec &module_spec, Process *process, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr) override
Definition: PlatformRemoteDarwinDevice.cpp:223
Process.h
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo
Definition: PlatformDarwinDevice.h:32
Target.h
lldb_private::ModuleSpec::GetUUID
UUID & GetUUID()
Definition: ModuleSpec.h:99
lldb_private::FileSpec
Definition: FileSpec.h:55
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::PlatformRemoteDarwinDevice::GetSDKIndexBySDKDirectoryInfo
uint32_t GetSDKIndexBySDKDirectoryInfo(const SDKDirectoryInfo *sdk_info)
Definition: PlatformRemoteDarwinDevice.cpp:375
ModuleList.h
lldb_private::ConstString::GetStringRef
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
Definition: ConstString.h:201
Log.h
lldb_private::PlatformRemoteDarwinDevice::GetConnectedSDKIndex
uint32_t GetConnectedSDKIndex()
Definition: PlatformRemoteDarwinDevice.cpp:355
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
StreamString.h
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::PlatformDarwinDevice::GetDeviceSupportDirectoryForOSVersion
const char * GetDeviceSupportDirectoryForOSVersion()
Definition: PlatformDarwinDevice.cpp:249
lldb_private::PlatformRemoteDarwinDevice::ResolveExecutable
Status ResolveExecutable(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr) override
Find a platform plugin for a given process.
Definition: PlatformRemoteDarwinDevice.cpp:65
HostInfo.h
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::FileSystem::Resolve
void Resolve(llvm::SmallVectorImpl< char > &path)
Resolve path to make it canonical.
Definition: common/FileSystem.cpp:235
lldb_private::ArchSpec::IsValid
bool IsValid() const
Tests if this ArchSpec is valid.
Definition: ArchSpec.h:361
lldb_private::PlatformRemoteDarwinDevice::~PlatformRemoteDarwinDevice
~PlatformRemoteDarwinDevice() override
Destructor.
lldb_private::FileSpec::Clear
void Clear()
Clears the object state.
Definition: FileSpec.cpp:257
lldb_private::ModuleSpec::GetFileSpec
FileSpec & GetFileSpec()
Definition: ModuleSpec.h:53
lldb_private::ModuleSpec
Definition: ModuleSpec.h:27
lldb_private::Status
Definition: Status.h:44
uint32_t
lldb_private::PlatformDarwinDevice
Abstract Darwin platform with a potential device support directory.
Definition: PlatformDarwinDevice.h:21
lldb_private::PlatformRemoteDarwinDevice::GetSymbolFile
virtual Status GetSymbolFile(const FileSpec &platform_file, const UUID *uuid_ptr, FileSpec &local_file)
Definition: PlatformRemoteDarwinDevice.cpp:163
lldb_private::PlatformRemoteDarwinDevice::GetFileInSDK
bool GetFileInSDK(const char *platform_file_path, uint32_t sdk_idx, FileSpec &local_file)
Definition: PlatformRemoteDarwinDevice.cpp:130
lldb_private::PlatformDarwinDevice::GetSharedModuleWithLocalCache
virtual Status GetSharedModuleWithLocalCache(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr)
Definition: PlatformDarwinDevice.cpp:295
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb_private::PlatformDarwin::FindBundleBinaryInExecSearchPaths
Status FindBundleBinaryInExecSearchPaths(const ModuleSpec &module_spec, Process *process, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr)
Definition: PlatformDarwin.cpp:1225
PluginManager.h
lldb_private::RemoteAwarePlatform::GetRemoteOSBuildString
llvm::Optional< std::string > GetRemoteOSBuildString() override
Definition: RemoteAwarePlatform.cpp:308
lldb_private::ModuleSpec::GetArchitecture
ArchSpec & GetArchitecture()
Definition: ModuleSpec.h:89
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb_private::Platform::GetSupportedArchitectures
virtual std::vector< ArchSpec > GetSupportedArchitectures(const ArchSpec &process_host_arch)=0
Get the platform's supported architectures in the order in which they should be searched.
lldb_private::FileSystem::Instance
static FileSystem & Instance()
Definition: common/FileSystem.cpp:46
Status.h
lldb_private::FileSpec::AppendPathComponent
void AppendPathComponent(llvm::StringRef component)
Definition: FileSpec.cpp:451
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
FileSpec.h
lldb_private::Platform::GetStatus
virtual void GetStatus(Stream &strm)
Report the current status for this platform.
Definition: Platform.cpp:285
lldb_private::Log
Definition: Log.h:115
lldb_private::Stream::PutCString
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition: Stream.cpp:63
lldb_private::FileSpec::SetFile
void SetFile(llvm::StringRef path, Style style)
Change the file specified with a new path.
Definition: FileSpec.cpp:172
llvm::SmallVectorImpl
Definition: Disassembler.h:42
PATH_MAX
#define PATH_MAX
Definition: windows/PosixApi.h:25
lldb_private::GetLog
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition: Log.h:309
lldb_private::FileSpec::GetPath
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
Definition: FileSpec.cpp:364
lldb
Definition: SBAddress.h:15
lldb_private::ModuleList::GetSharedModule
static Status GetSharedModule(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr, bool always_create=false)
Definition: ModuleList.cpp:786
LLDBLog.h
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo::directory
FileSpec directory
Definition: PlatformDarwinDevice.h:34