diff options
| author | Pavel Labath <labath@google.com> | 2018-06-28 10:03:42 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2018-06-28 10:03:42 +0000 |
| commit | 9ea80d259f8a8077c9cfbbc125c824d98aad927c (patch) | |
| tree | bd48a343a35d18f9377c551e6c91c146b5becbc6 /lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp | |
| parent | abebe4c746e34220fdd1da6783dd3920125260d0 (diff) | |
| download | bcm5719-llvm-9ea80d259f8a8077c9cfbbc125c824d98aad927c.tar.gz bcm5719-llvm-9ea80d259f8a8077c9cfbbc125c824d98aad927c.zip | |
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
Diffstat (limited to 'lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp')
| -rw-r--r-- | lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp b/lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp new file mode 100644 index 00000000000..62e201df5fe --- /dev/null +++ b/lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp @@ -0,0 +1,8 @@ +int main() { + auto r = 0; + for (auto i = 1; i <= 10; i++) { + r += i & 1 + (i - 1) & 1 - 1; + } + + return r; +} |

