brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · efbe68b Raw
69 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGSYMBOLS_SYMBOLLOCATORDEBUGSYMBOLS_H10#define LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGSYMBOLS_SYMBOLLOCATORDEBUGSYMBOLS_H11 12#include "lldb/Symbol/SymbolLocator.h"13#include "lldb/lldb-private.h"14 15namespace lldb_private {16 17class SymbolLocatorDebugSymbols : public SymbolLocator {18public:19  SymbolLocatorDebugSymbols();20 21  static void Initialize();22  static void Terminate();23 24  static llvm::StringRef GetPluginNameStatic() { return "DebugSymbols"; }25  static llvm::StringRef GetPluginDescriptionStatic();26 27  static lldb_private::SymbolLocator *CreateInstance();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 the37  // 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 the44  // 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 build52  // repository, or using any other means necessary to locate both the53  // unstripped object file and the debug symbols. The force_lookup argument54  // controls whether the external program is called unconditionally to find55  // the symbol file, or if the user's settings are checked to see if they've56  // 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_private67 68#endif // LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGSYMBOLS_SYMBOLLOCATORDEBUGSYMBOLS_H69