LLDB mainline
SymbolLocatorDefault.h
Go to the documentation of this file.
1//===-- SymbolLocatorDefault.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_DEFAULT_SYMBOLLOCATORDEFAULT_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEFAULT_SYMBOLLOCATORDEFAULT_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 "Default"; }
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
62} // namespace lldb_private
63
64#endif // LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEFAULT_SYMBOLLOCATORDEFAULT_H
static llvm::raw_ostream & error(Stream &strm)
A file collection class.
Definition: FileSpecList.h:91
An error handling class.
Definition: Status.h:44
llvm::StringRef GetPluginName() override
PluginInterface protocol.
static llvm::StringRef GetPluginNameStatic()
static bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec, Status &error, bool force_lookup, bool copy_executable)
static llvm::StringRef GetPluginDescriptionStatic()
static std::optional< FileSpec > LocateExecutableSymbolFile(const ModuleSpec &module_spec, const FileSpecList &default_search_paths)
static std::optional< ModuleSpec > LocateExecutableObjectFile(const ModuleSpec &module_spec)
static lldb_private::SymbolLocator * CreateInstance()
A class that represents a running process on the host machine.