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"
15#include "lldb/Core/PluginInterface.h"
16#include "lldb/Symbol/SourceModule.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
22namespace 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.
31class SymbolVendor : public ModuleChild, public PluginInterface {
32public:
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 llvm::StringRef GetPluginName() override { return "vendor-default"; }
45
46protected:
47 std::unique_ptr<SymbolFile> m_sym_file_up; // A single symbol file. Subclasses
48 // can add more of these if needed.
49};
50
51} // namespace lldb_private
52
53#endif // LLDB_SYMBOL_SYMBOLVENDOR_H
54

source code of lldb/include/lldb/Symbol/SymbolVendor.h