• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // clang-format off
2 // REQUIRES: lld, x86
3 
4 // Test that we can set simple breakpoints using PDB on any platform.
5 // RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
6 // RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
7 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
8 // RUN:     %p/Inputs/break-by-line.lldbinit | FileCheck %s
9 
10 // This is a separate test from break-by-function.cpp because this test is
11 // sensitive to edits in the source file.
12 
13 namespace NS {
NamespaceFn(int X)14   int NamespaceFn(int X) {
15     return X + 42;
16   }
17 }
18 
main(int argc,char ** argv)19 int main(int argc, char **argv) {
20   return NS::NamespaceFn(argc);
21 }
22 
23 
24 // CHECK:      (lldb) target create "{{.*}}break-by-line.cpp.tmp.exe"
25 // CHECK:      Current executable set to '{{.*}}break-by-line.cpp.tmp.exe'
26 // CHECK:      (lldb) break set -f break-by-line.cpp -l 15
27 // CHECK:      Breakpoint 1: where = break-by-line.cpp.tmp.exe`NS::NamespaceFn + {{[0-9]+}} at break-by-line.cpp:15
28