blob: abd90cde9dde78aa66cc441966e450ceda8eb255 [file] [log] [blame]
Zachary Turner307f5ae2018-10-12 19:47:13 +00001// clang-format off
2
3// Test that we can set display source of functions.
4// RUN: clang-cl /Z7 /GS- /GR- /c %s /Fo%t.obj
5// RUN: lld-link /DEBUG /nodefaultlib /entry:main /OUT:%t.exe /PDB:%t.pdb %t.obj
6// RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb -f %t.exe -s \
7// RUN: %p/Inputs/source-list.lldbinit | FileCheck %s
8
9
10
11// Some context lines before
12// the function.
13
14
15int main(int argc, char **argv) {
16 // Here are some comments.
17 // That we should print when listing source.
18 return 0;
19}
20
21// Some context lines after
22// the function.
23
24// check lines go at the end so that line numbers stay stable when
25// changing this file.
26
27// CHECK: (lldb) source list -n main
28// CHECK: File: {{.*}}source-list.cpp
29// CHECK: 10
30// CHECK: 11 // Some context lines before
31// CHECK: 12 // the function.
32// CHECK: 13
33// CHECK: 14
34// CHECK: 15 int main(int argc, char **argv) {
35// CHECK: 16 // Here are some comments.
36// CHECK: 17 // That we should print when listing source.
37// CHECK: 18 return 0;
38// CHECK: 19 }
39// CHECK: 20
40// CHECK: 21 // Some context lines after
41// CHECK: 22 // the function.
42// CHECK: 23