[DebugInfo] Add a new method IPDBSession::findLineNumbersBySectOffset
authorAaron Smith <aaron.smith@microsoft.com>
Thu, 15 Mar 2018 06:04:51 +0000 (06:04 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Thu, 15 Mar 2018 06:04:51 +0000 (06:04 +0000)
commit40198f59053d7131ef0f7b4deb8725ab5fc19e29
tree955e63933212692ff4d737d4f42789f5b1be1a20
parent9cc222c80de913d62b8a8d16c1c1dcc9665febb0
[DebugInfo] Add a new method IPDBSession::findLineNumbersBySectOffset

Summary:
Some PDB symbols do not have a valid VA or RVA but have Addr by Section and Offset. For example, a variable in thread-local storage has the following properties:

     get_addressOffset: 0
     get_addressSection: 5
     get_lexicalParentId: 2
     get_name: g_tls
     get_symIndexId: 12
     get_typeId: 4
     get_dataKind: 6
     get_symTag: 7
     get_locationType: 2

This change provides a new method to locate line numbers by Section and Offset from those symbols.

Reviewers: zturner, rnk, llvm-commits

Subscribers: asmith, JDevlieghere

Differential Revision: https://reviews.llvm.org/D44407

llvm-svn: 327601
llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h
llvm/include/llvm/DebugInfo/PDB/IPDBSession.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h
llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp
llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp