1 // XFAIL: target-arm && linux-gnu
2 // clang-format off
3 // REQUIRES: lld
4 
5 // Test that we can set display source of functions.
6 // RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
7 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
8 // RUN:     %p/Inputs/source-list.lldbinit | FileCheck %s
9 
10 
11 
12 // Some context lines before
13 // the function.
14 
15 
16 int main(int argc, char **argv) {
17   // Here are some comments.
18   // That we should print when listing source.
19   return 0;
20 }
21 
22 // Some context lines after
23 // the function.
24 
25 // check lines go at the end so that line numbers stay stable when
26 // changing this file.
27 
28 // CHECK: (lldb) source list -n main
29 // CHECK: File: {{.*}}source-list.cpp
30 // CHECK:    10
31 // CHECK:    11    // Some context lines before
32 // CHECK:    12   // the function.
33 // CHECK:    13
34 // CHECK:    14
35 // CHECK:    15   int main(int argc, char **argv) {
36 // CHECK:    16     // Here are some comments.
37 // CHECK:    17     // That we should print when listing source.
38 // CHECK:    18     return 0;
39 // CHECK:    19   }
40 // CHECK:    20
41 // CHECK:    21   // Some context lines after
42 // CHECK:    22   // the function.
43 // CHECK:    23
44