File indexing completed on 2026-05-10 08:43:45
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_PDB_PDBCONTEXT_H
0010 #define LLVM_DEBUGINFO_PDB_PDBCONTEXT_H
0011
0012 #include "llvm/DebugInfo/DIContext.h"
0013 #include "llvm/DebugInfo/PDB/IPDBSession.h"
0014 #include <cstdint>
0015 #include <memory>
0016 #include <string>
0017
0018 namespace llvm {
0019
0020 namespace object {
0021 class COFFObjectFile;
0022 }
0023
0024 namespace pdb {
0025
0026
0027
0028
0029
0030
0031
0032 class PDBContext : public DIContext {
0033 public:
0034 PDBContext(const object::COFFObjectFile &Object,
0035 std::unique_ptr<IPDBSession> PDBSession);
0036 PDBContext(PDBContext &) = delete;
0037 PDBContext &operator=(PDBContext &) = delete;
0038
0039 static bool classof(const DIContext *DICtx) {
0040 return DICtx->getKind() == CK_PDB;
0041 }
0042
0043 void dump(raw_ostream &OS, DIDumpOptions DIDumpOpts) override;
0044
0045 DILineInfo getLineInfoForAddress(
0046 object::SectionedAddress Address,
0047 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
0048 DILineInfo
0049 getLineInfoForDataAddress(object::SectionedAddress Address) override;
0050 DILineInfoTable getLineInfoForAddressRange(
0051 object::SectionedAddress Address, uint64_t Size,
0052 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
0053 DIInliningInfo getInliningInfoForAddress(
0054 object::SectionedAddress Address,
0055 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
0056
0057 std::vector<DILocal>
0058 getLocalsForAddress(object::SectionedAddress Address) override;
0059
0060 private:
0061 std::string getFunctionName(uint64_t Address, DINameKind NameKind) const;
0062 std::unique_ptr<IPDBSession> Session;
0063 };
0064
0065 }
0066
0067 }
0068
0069 #endif