Zachary Turner | 307f5ae | 2018-10-12 19:47:13 +0000 | [diff] [blame] | 1 | // clang-format off |
Zachary Turner | 71f484c | 2018-10-12 23:07:32 +0000 | [diff] [blame] | 2 | // REQUIRES: lld |
Zachary Turner | 307f5ae | 2018-10-12 19:47:13 +0000 | [diff] [blame] | 3 | |
| 4 | // Test that we can set display source of functions. |
Zachary Turner | 58db03a | 2018-11-19 15:12:34 +0000 | [diff] [blame] | 5 | // RUN: %clang_cl /Z7 /GS- /GR- /c /Fo%t.obj -- %s |
Zachary Turner | 8040eea | 2018-10-12 22:57:40 +0000 | [diff] [blame] | 6 | // RUN: lld-link /DEBUG /nodefaultlib /entry:main /OUT:%t.exe /PDB:%t.pdb -- %t.obj |
Zachary Turner | 58db03a | 2018-11-19 15:12:34 +0000 | [diff] [blame] | 7 | // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ |
Zachary Turner | 307f5ae | 2018-10-12 19:47:13 +0000 | [diff] [blame] | 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 |
Zachary Turner | 71f484c | 2018-10-12 23:07:32 +0000 | [diff] [blame] | 30 | // CHECK: 11 |
| 31 | // CHECK: 12 // Some context lines before |
| 32 | // CHECK: 13 // the function. |
Zachary Turner | 307f5ae | 2018-10-12 19:47:13 +0000 | [diff] [blame] | 33 | // CHECK: 14 |
Zachary Turner | 71f484c | 2018-10-12 23:07:32 +0000 | [diff] [blame] | 34 | // 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 |