1254721Semaste//===-- SymbolVendor.h ------------------------------------------*- C++ -*-===//
2254721Semaste//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6254721Semaste//
7254721Semaste//===----------------------------------------------------------------------===//
8254721Semaste
9254721Semaste#ifndef liblldb_SymbolVendor_h_
10254721Semaste#define liblldb_SymbolVendor_h_
11254721Semaste
12254721Semaste#include <vector>
13254721Semaste
14254721Semaste#include "lldb/Core/ModuleChild.h"
15254721Semaste#include "lldb/Core/PluginInterface.h"
16353358Sdim#include "lldb/Symbol/SourceModule.h"
17296417Sdim#include "lldb/Symbol/TypeMap.h"
18314564Sdim#include "lldb/lldb-private.h"
19309124Sdim#include "llvm/ADT/DenseSet.h"
20254721Semaste
21254721Semastenamespace lldb_private {
22254721Semaste
23341825Sdim// The symbol vendor class is designed to abstract the process of searching for
24341825Sdim// debug information for a given module. Platforms can subclass this class and
25341825Sdim// provide extra ways to find debug information. Examples would be a subclass
26341825Sdim// that would allow for locating a stand alone debug file, parsing debug maps,
27341825Sdim// or runtime data in the object files. A symbol vendor can use multiple
28341825Sdim// sources (SymbolFile objects) to provide the information and only parse as
29341825Sdim// deep as needed in order to provide the information that is requested.
30314564Sdimclass SymbolVendor : public ModuleChild, public PluginInterface {
31254721Semastepublic:
32314564Sdim  static SymbolVendor *FindPlugin(const lldb::ModuleSP &module_sp,
33314564Sdim                                  Stream *feedback_strm);
34254721Semaste
35314564Sdim  // Constructors and Destructors
36314564Sdim  SymbolVendor(const lldb::ModuleSP &module_sp);
37254721Semaste
38314564Sdim  ~SymbolVendor() override;
39254721Semaste
40314564Sdim  void AddSymbolFileRepresentation(const lldb::ObjectFileSP &objfile_sp);
41254721Semaste
42353358Sdim  SymbolFile *GetSymbolFile() { return m_sym_file_up.get(); }
43254721Semaste
44314564Sdim  // PluginInterface protocol
45314564Sdim  ConstString GetPluginName() override;
46314564Sdim
47314564Sdim  uint32_t GetPluginVersion() override;
48314564Sdim
49254721Semasteprotected:
50353358Sdim  std::unique_ptr<SymbolFile> m_sym_file_up; // A single symbol file. Subclasses
51314564Sdim                                             // can add more of these if needed.
52254721Semaste
53254721Semasteprivate:
54314564Sdim  // For SymbolVendor only
55314564Sdim  DISALLOW_COPY_AND_ASSIGN(SymbolVendor);
56254721Semaste};
57254721Semaste
58254721Semaste} // namespace lldb_private
59254721Semaste
60296417Sdim#endif // liblldb_SymbolVendor_h_
61