blob: 36cf5f75ebee6ba89ba4233b6646edd56a01e9fe [file] [log] [blame]
Zachary Turner307f5ae2018-10-12 19:47:13 +00001// clang-format off
Zachary Turner71f484c2018-10-12 23:07:32 +00002// REQUIRES: lld
Zachary Turner307f5ae2018-10-12 19:47:13 +00003
4// Test that we can set display source of functions.
Zachary Turner58db03a2018-11-19 15:12:34 +00005// RUN: %clang_cl /Z7 /GS- /GR- /c /Fo%t.obj -- %s
Zachary Turner8040eea2018-10-12 22:57:40 +00006// RUN: lld-link /DEBUG /nodefaultlib /entry:main /OUT:%t.exe /PDB:%t.pdb -- %t.obj
Zachary Turner58db03a2018-11-19 15:12:34 +00007// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
Zachary Turner307f5ae2018-10-12 19:47:13 +00008// RUN: %p/Inputs/source-list.lldbinit | FileCheck %s
9
10
11
12// Some context lines before
13// the function.
14
15
16int 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
Zachary Turner71f484c2018-10-12 23:07:32 +000030// CHECK: 11
31// CHECK: 12 // Some context lines before
32// CHECK: 13 // the function.
Zachary Turner307f5ae2018-10-12 19:47:13 +000033// CHECK: 14
Zachary Turner71f484c2018-10-12 23:07:32 +000034// CHECK: 15
35// CHECK: 16 int main(int argc, char **argv) {
36// CHECK: 17 // Here are some comments.
37// CHECK: 18 // That we should print when listing source.
38// CHECK: 19 return 0;
39// CHECK: 20 }
40// CHECK: 21
41// CHECK: 22 // Some context lines after
42// CHECK: 23 // the function.
43// CHECK: 24