blob: ae3269f3719f24a6097839c00a2796627b737ec5 [file] [log] [blame]
Zachary Turnerb3130b42019-01-02 18:32:50 +00001// clang-format off
2// REQUIRES: lld
3
4// Test that we can set simple breakpoints using PDB on any platform.
5// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
6// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
7// RUN: %p/Inputs/break-by-line.lldbinit | FileCheck %s
8
9// This is a separate test from break-by-function.cpp because this test is
10// sensitive to edits in the source file.
11
12namespace NS {
13 int NamespaceFn(int X) {
14 return X + 42;
15 }
16}
17
18int main(int argc, char **argv) {
19 return NS::NamespaceFn(argc);
20}
21
22
23// CHECK: (lldb) target create "{{.*}}break-by-line.cpp.tmp.exe"
24// CHECK: Current executable set to '{{.*}}break-by-line.cpp.tmp.exe'
25// CHECK: (lldb) break set -f break-by-line.cpp -l 14
26// CHECK: Breakpoint 1: where = break-by-line.cpp.tmp.exe`NS::NamespaceFn + {{[0-9]+}} at break-by-line.cpp:14