43 lines · cpp
1// clang-format off2// REQUIRES: lld, x863 4// Test that we can set display source of functions.5// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s6// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb7// RUN: %lldb -f %t.exe -s \8// RUN: %p/Inputs/source-list.lldbinit | FileCheck %s9 10 11// Some context lines before12// 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 after22// the function.23 24// check lines go at the end so that line numbers stay stable when25// changing this file.26 27// CHECK: (lldb) source list -n main28// CHECK: File: {{.*}}source-list.cpp29// CHECK: 1030// CHECK: 11 // Some context lines before31// CHECK: 12 // the function.32// CHECK: 1333// CHECK: 1434// 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: 2040// CHECK: 21 // Some context lines after41// CHECK: 22 // the function.42// CHECK: 2343