LLDB mainline
SymbolLocatorDebugSymbols.h
Go to the documentation of this file.
1//===-- SymbolLocatorDebugSymbols.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_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGSYMBOLS_SYMBOLLOCATORDEBUGSYMBOLS_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGSYMBOLS_SYMBOLLOCATORDEBUGSYMBOLS_H
11
13#include "lldb/lldb-private.h"
14
15namespace lldb_private {
16
18public:
20
21 static void Initialize();
22 static void Terminate();
23
24 static llvm::StringRef GetPluginNameStatic() { return "DebugSymbols"; }
25 static llvm::StringRef GetPluginDescriptionStatic();
26
28
29 /// PluginInterface protocol.
30 /// \{
31 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
32 /// \}
33
34 // Locate the executable file given a module specification.
35 //
36 // Locating the file should happen only on the local computer or using the
37 // current computers global settings.
38 static std::optional<ModuleSpec>
39 LocateExecutableObjectFile(const ModuleSpec &module_spec);
40
41 // Locate the symbol file given a module specification.
42 //
43 // Locating the file should happen only on the local computer or using the
44 // current computers global settings.
45 static std::optional<FileSpec>
46 LocateExecutableSymbolFile(const ModuleSpec &module_spec,
47 const FileSpecList &default_search_paths);
48
49 // Locate the object and symbol file given a module specification.
50 //
51 // Locating the file can try to download the file from a corporate build
52 // repository, or using any other means necessary to locate both the
53 // unstripped object file and the debug symbols. The force_lookup argument
54 // controls whether the external program is called unconditionally to find
55 // the symbol file, or if the user's settings are checked to see if they've
56 // enabled the external program before calling.
57 static bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec,
58 Status &error, bool force_lookup,
59 bool copy_executable);
60
61 static std::optional<FileSpec>
62 FindSymbolFileInBundle(const FileSpec &dsym_bundle_fspec, const UUID *uuid,
63 const ArchSpec *arch);
64};
65
66} // namespace lldb_private
67
68#endif // LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGSYMBOLS_SYMBOLLOCATORDEBUGSYMBOLS_H
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
Definition: ArchSpec.h:31
A file collection class.
Definition: FileSpecList.h:85
A file utility class.
Definition: FileSpec.h:56
An error handling class.
Definition: Status.h:44
static std::optional< ModuleSpec > LocateExecutableObjectFile(const ModuleSpec &module_spec)
static lldb_private::SymbolLocator * CreateInstance()
llvm::StringRef GetPluginName() override
PluginInterface protocol.
static std::optional< FileSpec > LocateExecutableSymbolFile(const ModuleSpec &module_spec, const FileSpecList &default_search_paths)
static bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec, Status &error, bool force_lookup, bool copy_executable)
static std::optional< FileSpec > FindSymbolFileInBundle(const FileSpec &dsym_bundle_fspec, const UUID *uuid, const ArchSpec *arch)
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14