LLDB  mainline
SymbolVendor.h
Go to the documentation of this file.
1 //===-- SymbolVendor.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_SYMBOLVENDOR_H
10 #define LLDB_SYMBOL_SYMBOLVENDOR_H
11 
12 #include <vector>
13 
14 #include "lldb/Core/ModuleChild.h"
17 #include "lldb/Symbol/SymbolFile.h"
18 #include "lldb/Symbol/TypeMap.h"
19 #include "lldb/lldb-private.h"
20 #include "llvm/ADT/DenseSet.h"
21 
22 namespace lldb_private {
23 
24 // The symbol vendor class is designed to abstract the process of searching for
25 // debug information for a given module. Platforms can subclass this class and
26 // provide extra ways to find debug information. Examples would be a subclass
27 // that would allow for locating a stand alone debug file, parsing debug maps,
28 // or runtime data in the object files. A symbol vendor can use multiple
29 // sources (SymbolFile objects) to provide the information and only parse as
30 // deep as needed in order to provide the information that is requested.
31 class SymbolVendor : public ModuleChild, public PluginInterface {
32 public:
33  static SymbolVendor *FindPlugin(const lldb::ModuleSP &module_sp,
34  Stream *feedback_strm);
35 
36  // Constructors and Destructors
37  SymbolVendor(const lldb::ModuleSP &module_sp);
38 
39  void AddSymbolFileRepresentation(const lldb::ObjectFileSP &objfile_sp);
40 
41  SymbolFile *GetSymbolFile() { return m_sym_file_up.get(); }
42 
43  // PluginInterface protocol
44  ConstString GetPluginName() override;
45 
46  uint32_t GetPluginVersion() override;
47 
48 protected:
49  std::unique_ptr<SymbolFile> m_sym_file_up; // A single symbol file. Subclasses
50  // can add more of these if needed.
51 };
52 
53 } // namespace lldb_private
54 
55 #endif // LLDB_SYMBOL_SYMBOLVENDOR_H
lldb_private::SymbolFile
Definition: SymbolFile.h:37
lldb_private::SymbolVendor::AddSymbolFileRepresentation
void AddSymbolFileRepresentation(const lldb::ObjectFileSP &objfile_sp)
Definition: SymbolVendor.cpp:64
lldb_private::ModuleChild
Definition: ModuleChild.h:19
TypeMap.h
lldb_private::PluginInterface
Definition: PluginInterface.h:16
lldb_private::SymbolVendor::m_sym_file_up
std::unique_ptr< SymbolFile > m_sym_file_up
Definition: SymbolVendor.h:49
lldb_private::Stream
Definition: Stream.h:28
lldb_private::SymbolVendor
Definition: SymbolVendor.h:31
SourceModule.h
lldb_private::ConstString
Definition: ConstString.h:40
PluginInterface.h
lldb_private::SymbolVendor::FindPlugin
static SymbolVendor * FindPlugin(const lldb::ModuleSP &module_sp, Stream *feedback_strm)
Definition: SymbolVendor.cpp:26
lldb-private.h
uint32_t
ModuleChild.h
lldb_private::SymbolVendor::GetPluginVersion
uint32_t GetPluginVersion() override
Definition: SymbolVendor.cpp:79
lldb_private::SymbolVendor::SymbolVendor
SymbolVendor(const lldb::ModuleSP &module_sp)
Definition: SymbolVendor.cpp:60
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::SymbolVendor::GetSymbolFile
SymbolFile * GetSymbolFile()
Definition: SymbolVendor.h:41
SymbolFile.h
lldb_private::SymbolVendor::GetPluginName
ConstString GetPluginName() override
Definition: SymbolVendor.cpp:74