ExplainOutputStyle.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //===- ExplainOutputStyle.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_EXPLAINOUTPUTSTYLE_H
  9. #define LLVM_TOOLS_LLVMPDBDUMP_EXPLAINOUTPUTSTYLE_H
  10. #include "OutputStyle.h"
  11. #include "llvm/DebugInfo/PDB/Native/LinePrinter.h"
  12. #include <string>
  13. namespace llvm {
  14. namespace pdb {
  15. class DbiStream;
  16. class InfoStream;
  17. class InputFile;
  18. class ExplainOutputStyle : public OutputStyle {
  19. public:
  20. ExplainOutputStyle(InputFile &File, uint64_t FileOffset);
  21. Error dump() override;
  22. private:
  23. Error explainPdbFile();
  24. Error explainBinaryFile();
  25. bool explainPdbBlockStatus();
  26. bool isPdbFpm1() const;
  27. bool isPdbFpm2() const;
  28. bool isPdbSuperBlock() const;
  29. bool isPdbFpmBlock() const;
  30. bool isPdbBlockMapBlock() const;
  31. bool isPdbStreamDirectoryBlock() const;
  32. std::optional<uint32_t> getPdbBlockStreamIndex() const;
  33. void explainPdbSuperBlockOffset();
  34. void explainPdbFpmBlockOffset();
  35. void explainPdbBlockMapOffset();
  36. void explainPdbStreamDirectoryOffset();
  37. void explainPdbStreamOffset(uint32_t Stream);
  38. void explainPdbUnknownBlock();
  39. void explainStreamOffset(DbiStream &Stream, uint32_t OffsetInStream);
  40. void explainStreamOffset(InfoStream &Stream, uint32_t OffsetInStream);
  41. uint32_t pdbBlockIndex() const;
  42. uint32_t pdbBlockOffset() const;
  43. InputFile &File;
  44. const uint64_t FileOffset;
  45. LinePrinter P;
  46. };
  47. } // namespace pdb
  48. } // namespace llvm
  49. #endif