Retrieve a function PDB symbol correctly from nested blocks
authorPavel Labath <labath@google.com>
Thu, 28 Jun 2018 10:03:42 +0000 (10:03 +0000)
committerPavel Labath <labath@google.com>
Thu, 28 Jun 2018 10:03:42 +0000 (10:03 +0000)
commit9ea80d259f8a8077c9cfbbc125c824d98aad927c
treebd48a343a35d18f9377c551e6c91c146b5becbc6
parentabebe4c746e34220fdd1da6783dd3920125260d0
Retrieve a function PDB symbol correctly from nested blocks

Summary:
This patch fixes a problem with retrieving a function symbol by an
address in a nested block. In the current implementation of
ResolveSymbolContext function it retrieves a symbol with
PDB_SymType::None and then checks if found symbol's tag equals to
PDB_SymType::Function. So, if nested block's symbol was found,
ResolveSymbolContext does not resolve a function.

Reviewers: asmith, labath, zturner

Reviewed By: asmith, labath

Differential Revision: https://reviews.llvm.org/D47939
Patch by Aleksandr Urakov <aleksandr.urakov@jetbrains.com>

llvm-svn: 335822
lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp [new file with mode: 0644]
lldb/lit/SymbolFile/PDB/function-nested-block.test [new file with mode: 0644]
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
lldb/tools/lldb-test/lldb-test.cpp