File tree Expand file tree Collapse file tree 4 files changed +56
-0
lines changed
llvm/test/tools/llvm-debuginfo-analyzer/DWARF Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ ; Regression test for:
2+ ; - DW_AT_ranges not being read properly
3+
4+ ; clang test.cpp --target=i686-pc-linux -g -O2
5+ ; 01
6+ ; 02 float foo(float a) {
7+ ; 03 return a+a;
8+ ; 04 }
9+ ; 05
10+ ; 06 int main(int argc, char **argv) {
11+ ; 07 float my_var = argc;
12+ ; 08 for (int i = 0; i < 4; i++) {
13+ ; 09 float my_local_var = (float)argv[i][0];
14+ ; 10 my_var += foo(my_local_var);
15+ ; 11 }
16+ ; 12 return (int)my_var;
17+ ; 13 }
18+
19+ ; RUN: llvm-debuginfo-analyzer --attribute=all \
20+ ; RUN: --print=all \
21+ ; RUN: --output-sort=offset \
22+ ; RUN: %p/Inputs/DW_AT_ranges.o 2>&1 | \
23+ ; RUN: FileCheck %s
24+
25+ ; Make sure these two ranges are present and point to the correct offsets
26+ ; CHECK: [006] {Range} Lines 3:10 [0x0000001255:0x0000001258]
27+ ; CHECK: [006] {Range} Lines 3:10 [0x0000001288:0x000000128b]
28+
Original file line number Diff line number Diff line change 1+ ; Regression test for:
2+ ; - Instructions at DW_AT_high_pc of a scope incorrectly included in the scope
3+
4+ ; clang test.cpp --target=i686-pc-linux -g -O0
5+ ; 1
6+ ; 2 int main(void) {
7+ ; 3 float ret = 0;
8+ ; 4 for (int i = 0; i < 10; i++) {
9+ ; 5 ret += i;
10+ ; 6 }
11+ ; 7 return ret;
12+ ; 8 }
13+ ; 9
14+
15+ ; RUN: llvm-debuginfo-analyzer --attribute=all \
16+ ; RUN: --print=all \
17+ ; RUN: --output-sort=offset \
18+ ; RUN: %p/Inputs/high_pc_exclusive.o 2>&1 | \
19+ ; RUN: FileCheck %s
20+
21+ ; Make sure the line mapping at 0x122c does not show up at the scope level 004
22+ ; CHECK-NOT: [0x000000122c][004] 7 {Line}
23+
24+ ; Make sure it *does* appear at scope level 003
25+ ; CHECK: [0x000000122c][003] 7 {Line}
26+
27+
28+
You can’t perform that action at this time.
0 commit comments