From 40198f59053d7131ef0f7b4deb8725ab5fc19e29 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Thu, 15 Mar 2018 06:04:51 +0000 Subject: [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/unittests/DebugInfo/PDB/PDBApiTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/unittests/DebugInfo/PDB') diff --git a/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp b/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp index 4cc47aa4540..2b8050a50f3 100644 --- a/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp +++ b/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp @@ -88,6 +88,11 @@ class MockSession : public IPDBSession { findLineNumbersByAddress(uint64_t Address, uint32_t Length) const override { return nullptr; } + std::unique_ptr + findLineNumbersBySectOffset(uint32_t Section, uint32_t Offset, + uint32_t Length) const override { + return nullptr; + } std::unique_ptr findSourceFiles(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override { -- cgit v1.2.3