forked from OSchip/llvm-project
67a19dfbcb
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. It is very simple to reproduce this. For example, in the next program ``` int main() { auto r = 0; for (auto i = 1; i <= 10; i++) { r += i & 1 + (i - 1) & 1 - 1; } return r; } ``` if we will stop inside the cycle and will do a backtrace, the top element will be broken. But how we can test this? I thought to add an option to lldb-test to allow search a function by address, but the address may change when the compiler will be changed. Patch by: Aleksandr Urakov Reviewers: asmith, labath, zturner Reviewed By: asmith, labath Subscribers: stella.stamenova, llvm-commits Differential Revision: https://reviews.llvm.org/D47939 llvm-svn: 336564 |
||
---|---|---|
.. | ||
cmake | ||
docs | ||
examples | ||
include/lldb | ||
lit | ||
lldb.xcodeproj | ||
lldb.xcworkspace | ||
packages/Python/lldbsuite | ||
resources | ||
scripts | ||
source | ||
test | ||
third_party/Python/module | ||
tools | ||
unittests | ||
utils | ||
www | ||
.arcconfig | ||
.clang-format | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.txt | ||
INSTALL.txt | ||
LICENSE.TXT | ||
use_lldb_suite_root.py |