SymbolVendor.h 2.0 KB

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