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
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.
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
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
A mix in class that contains a pointer back to the module that owns the object which inherits from it...
Definition: ModuleChild.h:19
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Provides public interface for all SymbolFiles.
Definition: SymbolFile.h:50
SymbolFile * GetSymbolFile()
Definition: SymbolVendor.h:41
llvm::StringRef GetPluginName() override
Definition: SymbolVendor.h:44
void AddSymbolFileRepresentation(const lldb::ObjectFileSP &objfile_sp)
static SymbolVendor * FindPlugin(const lldb::ModuleSP &module_sp, Stream *feedback_strm)
std::unique_ptr< SymbolFile > m_sym_file_up
Definition: SymbolVendor.h:47
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
Definition: lldb-forward.h:373
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:371