llvm-project/lldb/lit
Stella Stamenova 67a19dfbcb 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.

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
2018-07-09 17:36:33 +00:00
..
Breakpoint [lit, windows] Disable a number of tests that are failing on Windows 2018-06-07 17:49:22 +00:00
Expr [IRMemoryMap] Use labels in the "malloc" and "free" lldb-test commands 2018-06-04 17:11:15 +00:00
Modules Add a test for reading lld-generated build-ids 2018-06-29 12:15:54 +00:00
Suite [lit] Don't require semicolon separator 2018-07-04 17:14:52 +00:00
SymbolFile Retrieve a function PDB symbol correctly from nested blocks 2018-07-09 17:36:33 +00:00
Unit Resubmit "[lit] Force site configs to run before source-tree configs" 2017-09-15 22:10:46 +00:00
tools/lldb-mi [lldb-mi] Re-implement symbol-list-lines command. 2018-07-03 15:40:20 +00:00
CMakeLists.txt [lit] Do not run Python tests w/ LLDB_DISABLE_PYTHON 2018-06-06 09:44:14 +00:00
lit-lldb-init Introduce a setting to disable Spotlight while running the test suite 2018-03-12 20:52:36 +00:00
lit.cfg lldb-test symbols: Add -file argument and the ability to dump global variables in a file 2018-06-12 12:57:36 +00:00
lit.site.cfg.in lldb-test symbols: Add ability to do name-based lookup 2018-05-03 10:57:16 +00:00