LLDB mainline
LocateSymbolFile.h
Go to the documentation of this file.
1//===-- LocateSymbolFile.h --------------------------------------*- C++ -*-===//
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
9#ifndef LLDB_SYMBOL_LOCATESYMBOLFILE_H
10#define LLDB_SYMBOL_LOCATESYMBOLFILE_H
11
12#include <cstdint>
13
16#include "lldb/Utility/Status.h"
17#include "lldb/lldb-forward.h"
18
19namespace lldb_private {
20
21class ArchSpec;
22class ModuleSpec;
23class UUID;
24
25class Symbols {
26public:
27 // Locate the executable file given a module specification.
28 //
29 // Locating the file should happen only on the local computer or using the
30 // current computers global settings.
31 static ModuleSpec LocateExecutableObjectFile(const ModuleSpec &module_spec);
32
33 // Locate the symbol file given a module specification.
34 //
35 // Locating the file should happen only on the local computer or using the
36 // current computers global settings.
37 static FileSpec
38 LocateExecutableSymbolFile(const ModuleSpec &module_spec,
39 const FileSpecList &default_search_paths);
40
41 static FileSpec FindSymbolFileInBundle(const FileSpec &dsym_bundle_fspec,
42 const lldb_private::UUID *uuid,
43 const ArchSpec *arch);
44
45 // Locate the object and symbol file given a module specification.
46 //
47 // Locating the file can try to download the file from a corporate build
48 // repository, or using any other means necessary to locate both the
49 // unstripped object file and the debug symbols. The force_lookup argument
50 // controls whether the external program is called unconditionally to find
51 // the symbol file, or if the user's settings are checked to see if they've
52 // enabled the external program before calling.
53 //
54 static bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec,
56 bool force_lookup = true,
57 bool copy_executable = true);
58
59 /// Locate the symbol file for the given UUID on a background thread. This
60 /// function returns immediately. Under the hood it uses the debugger's
61 /// thread pool to call DownloadObjectAndSymbolFile. If a symbol file is
62 /// found, this will notify all target which contain the module with the
63 /// given UUID.
64 static void DownloadSymbolFileAsync(const UUID &uuid);
65};
66
67} // namespace lldb_private
68
69#endif // LLDB_SYMBOL_LOCATESYMBOLFILE_H
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
Definition: ArchSpec.h:31
A file collection class.
Definition: FileSpecList.h:24
A file utility class.
Definition: FileSpec.h:56
An error handling class.
Definition: Status.h:44
static void DownloadSymbolFileAsync(const UUID &uuid)
Locate the symbol file for the given UUID on a background thread.
static FileSpec LocateExecutableSymbolFile(const ModuleSpec &module_spec, const FileSpecList &default_search_paths)
static bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec, Status &error, bool force_lookup=true, bool copy_executable=true)
static ModuleSpec LocateExecutableObjectFile(const ModuleSpec &module_spec)
static FileSpec FindSymbolFileInBundle(const FileSpec &dsym_bundle_fspec, const lldb_private::UUID *uuid, const ArchSpec *arch)
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14