1061da546Spatrick //===-- LocateSymbolFile.h --------------------------------------*- C++ -*-===//
2061da546Spatrick //
3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information.
5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6061da546Spatrick //
7061da546Spatrick //===----------------------------------------------------------------------===//
8061da546Spatrick 
9dda28197Spatrick #ifndef LLDB_SYMBOL_LOCATESYMBOLFILE_H
10dda28197Spatrick #define LLDB_SYMBOL_LOCATESYMBOLFILE_H
11061da546Spatrick 
12*be691f3bSpatrick #include <cstdint>
13061da546Spatrick 
14061da546Spatrick #include "lldb/Core/FileSpecList.h"
15061da546Spatrick #include "lldb/Utility/FileSpec.h"
16061da546Spatrick 
17061da546Spatrick namespace lldb_private {
18061da546Spatrick 
19061da546Spatrick class ArchSpec;
20061da546Spatrick class ModuleSpec;
21061da546Spatrick class UUID;
22061da546Spatrick 
23061da546Spatrick class Symbols {
24061da546Spatrick public:
25061da546Spatrick   // Locate the executable file given a module specification.
26061da546Spatrick   //
27061da546Spatrick   // Locating the file should happen only on the local computer or using the
28061da546Spatrick   // current computers global settings.
29061da546Spatrick   static ModuleSpec LocateExecutableObjectFile(const ModuleSpec &module_spec);
30061da546Spatrick 
31061da546Spatrick   // Locate the symbol file given a module specification.
32061da546Spatrick   //
33061da546Spatrick   // Locating the file should happen only on the local computer or using the
34061da546Spatrick   // current computers global settings.
35061da546Spatrick   static FileSpec
36061da546Spatrick   LocateExecutableSymbolFile(const ModuleSpec &module_spec,
37061da546Spatrick                              const FileSpecList &default_search_paths);
38061da546Spatrick 
39061da546Spatrick   static FileSpec FindSymbolFileInBundle(const FileSpec &dsym_bundle_fspec,
40061da546Spatrick                                          const lldb_private::UUID *uuid,
41061da546Spatrick                                          const ArchSpec *arch);
42061da546Spatrick 
43061da546Spatrick   // Locate the object and symbol file given a module specification.
44061da546Spatrick   //
45061da546Spatrick   // Locating the file can try to download the file from a corporate build
46061da546Spatrick   // repository, or using any other means necessary to locate both the
47061da546Spatrick   // unstripped object file and the debug symbols. The force_lookup argument
48061da546Spatrick   // controls whether the external program is called unconditionally to find
49061da546Spatrick   // the symbol file, or if the user's settings are checked to see if they've
50061da546Spatrick   // enabled the external program before calling.
51061da546Spatrick   //
52061da546Spatrick   static bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec,
53061da546Spatrick                                           bool force_lookup = true);
54061da546Spatrick };
55061da546Spatrick 
56061da546Spatrick } // namespace lldb_private
57061da546Spatrick 
58dda28197Spatrick #endif // LLDB_SYMBOL_LOCATESYMBOLFILE_H
59