BytesOutputStyle.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //===- BytesOutputStyle.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 LLVM_TOOLS_LLVMPDBDUMP_BYTESOUTPUTSTYLE_H
  9. #define LLVM_TOOLS_LLVMPDBDUMP_BYTESOUTPUTSTYLE_H
  10. #include "OutputStyle.h"
  11. #include "StreamUtil.h"
  12. #include "llvm/DebugInfo/PDB/Native/LinePrinter.h"
  13. #include "llvm/Support/Error.h"
  14. namespace llvm {
  15. namespace codeview {
  16. class LazyRandomTypeCollection;
  17. }
  18. namespace pdb {
  19. class PDBFile;
  20. class BytesOutputStyle : public OutputStyle {
  21. public:
  22. BytesOutputStyle(PDBFile &File);
  23. Error dump() override;
  24. private:
  25. void dumpNameMap();
  26. void dumpBlockRanges(uint32_t Min, uint32_t Max);
  27. void dumpByteRanges(uint32_t Min, uint32_t Max);
  28. void dumpFpm();
  29. void dumpStreamBytes();
  30. void dumpSectionContributions();
  31. void dumpSectionMap();
  32. void dumpModuleInfos();
  33. void dumpFileInfo();
  34. void dumpTypeServerMap();
  35. void dumpECData();
  36. void dumpModuleSyms();
  37. void dumpModuleC11();
  38. void dumpModuleC13();
  39. void dumpTypeIndex(uint32_t StreamIdx, ArrayRef<uint32_t> Indices);
  40. Expected<codeview::LazyRandomTypeCollection &>
  41. initializeTypes(uint32_t StreamIdx);
  42. std::unique_ptr<codeview::LazyRandomTypeCollection> TpiTypes;
  43. std::unique_ptr<codeview::LazyRandomTypeCollection> IpiTypes;
  44. PDBFile &File;
  45. LinePrinter P;
  46. ExitOnError Err;
  47. SmallVector<StreamInfo, 8> StreamPurposes;
  48. };
  49. } // namespace pdb
  50. } // namespace llvm
  51. #endif