1*5f757f3fSDimitry Andric //===-- SymbolLocatorDebuginfod.h -------------------------------*- C++ -*-===//
2*5f757f3fSDimitry Andric //
3*5f757f3fSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*5f757f3fSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*5f757f3fSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*5f757f3fSDimitry Andric //
7*5f757f3fSDimitry Andric //===----------------------------------------------------------------------===//
8*5f757f3fSDimitry Andric 
9*5f757f3fSDimitry Andric #ifndef LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGINFOD_SYMBOLLOCATORDEBUGINFOD_H
10*5f757f3fSDimitry Andric #define LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGINFOD_SYMBOLLOCATORDEBUGINFOD_H
11*5f757f3fSDimitry Andric 
12*5f757f3fSDimitry Andric #include "lldb/Core/Debugger.h"
13*5f757f3fSDimitry Andric #include "lldb/Symbol/SymbolLocator.h"
14*5f757f3fSDimitry Andric #include "lldb/lldb-private.h"
15*5f757f3fSDimitry Andric 
16*5f757f3fSDimitry Andric namespace lldb_private {
17*5f757f3fSDimitry Andric 
18*5f757f3fSDimitry Andric class SymbolLocatorDebuginfod : public SymbolLocator {
19*5f757f3fSDimitry Andric public:
20*5f757f3fSDimitry Andric   SymbolLocatorDebuginfod();
21*5f757f3fSDimitry Andric 
22*5f757f3fSDimitry Andric   static void Initialize();
23*5f757f3fSDimitry Andric   static void Terminate();
24*5f757f3fSDimitry Andric   static void DebuggerInitialize(Debugger &debugger);
25*5f757f3fSDimitry Andric 
GetPluginNameStatic()26*5f757f3fSDimitry Andric   static llvm::StringRef GetPluginNameStatic() { return "debuginfod"; }
27*5f757f3fSDimitry Andric   static llvm::StringRef GetPluginDescriptionStatic();
28*5f757f3fSDimitry Andric 
29*5f757f3fSDimitry Andric   static lldb_private::SymbolLocator *CreateInstance();
30*5f757f3fSDimitry Andric 
31*5f757f3fSDimitry Andric   /// PluginInterface protocol.
32*5f757f3fSDimitry Andric   /// \{
GetPluginName()33*5f757f3fSDimitry Andric   llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
34*5f757f3fSDimitry Andric   /// \}
35*5f757f3fSDimitry Andric 
36*5f757f3fSDimitry Andric   // Locate the executable file given a module specification.
37*5f757f3fSDimitry Andric   //
38*5f757f3fSDimitry Andric   // Locating the file should happen only on the local computer or using the
39*5f757f3fSDimitry Andric   // current computers global settings.
40*5f757f3fSDimitry Andric   static std::optional<ModuleSpec>
41*5f757f3fSDimitry Andric   LocateExecutableObjectFile(const ModuleSpec &module_spec);
42*5f757f3fSDimitry Andric 
43*5f757f3fSDimitry Andric   // Locate the symbol file given a module specification.
44*5f757f3fSDimitry Andric   //
45*5f757f3fSDimitry Andric   // Locating the file should happen only on the local computer or using the
46*5f757f3fSDimitry Andric   // current computers global settings.
47*5f757f3fSDimitry Andric   static std::optional<FileSpec>
48*5f757f3fSDimitry Andric   LocateExecutableSymbolFile(const ModuleSpec &module_spec,
49*5f757f3fSDimitry Andric                              const FileSpecList &default_search_paths);
50*5f757f3fSDimitry Andric };
51*5f757f3fSDimitry Andric 
52*5f757f3fSDimitry Andric } // namespace lldb_private
53*5f757f3fSDimitry Andric 
54*5f757f3fSDimitry Andric #endif // LLDB_SOURCE_PLUGINS_SYMBOLLOCATOR_DEBUGINFOD_SYMBOLLOCATORDEBUGINFOD_H
55