[DIA] Add IPDBSectionContrib interfaces and DIA implementation
authorAaron Smith <aaron.smith@microsoft.com>
Thu, 22 Mar 2018 04:08:15 +0000 (04:08 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Thu, 22 Mar 2018 04:08:15 +0000 (04:08 +0000)
commit523de05a1faafe9846608b796b5d7d5b51f4e6cf
treee448ae52ef8eca1d8ae01955a5fc0ba64fe4af5b
parent58a32a478f34a2809894d4c9ccf54d582d2416cc
[DIA] Add IPDBSectionContrib interfaces and DIA implementation

To resolve symbol context at a particular address, we need to
determine the compiland for the address. We are able to determine
the parent compiland of PDBSymbolFunc, PDBSymbolTypeUDT,
PDBSymbolTypeEnum symbols indirectly through line information.
However no such information is availabile for PDBSymbolData,
i.e. variables.

The Section Contribution table from PDBs has information about
each compiland's contribution to sections by address. For example,
a piece of a contribution looks like,

  VA         RelativeVA  Sect No.  Offset    Length    Compiland
  14000087B0 000087B0    0001      000077B0  000000BB  exe_main.obj

So given an address, it's possible to determine its compiland with
this information.

llvm-svn: 328178
15 files changed:
llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/PDB/DIA/DIASectionContrib.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h
llvm/include/llvm/DebugInfo/PDB/IPDBSectionContrib.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/PDB/IPDBSession.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h
llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
llvm/include/llvm/module.modulemap
llvm/lib/DebugInfo/PDB/CMakeLists.txt
llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/PDB/DIA/DIASectionContrib.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp
llvm/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp
llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp