summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests/win_cdb
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2019-10-31 13:41:24 +0000
committerJeremy Morse <jeremy.morse@sony.com>2019-10-31 13:49:47 +0000
commitf78c236efda85af1e526ac35ed535ef4786450e3 (patch)
tree1ff1609178e085f58b46dfcbce21fd6b2ef40025 /debuginfo-tests/win_cdb
parentefacf2ce55d698e5df8173f0d4dacbc7d3c7fd34 (diff)
downloadbcm5719-llvm-f78c236efda85af1e526ac35ed535ef4786450e3.tar.gz
bcm5719-llvm-f78c236efda85af1e526ac35ed535ef4786450e3.zip
Import Dexter to debuginfo-tests
Dexter (Debug Experience Tester) is a test-driver for our debug info integration tests, reading a set of debug experience expectations and comparing them with the actual behaviour of a program under a debugger. More about Dexter can be found in the RFC: http://lists.llvm.org/pipermail/llvm-dev/2019-October/135773.html and the phab review in D68708. Not all the debuginfo tests have been transformed into Dexter tests, and we look forwards to doing that incrementally. This commit mostly aims to flush out buildbots that are running debuginfo-tests but don't have python 3 installed, possibly green-dragon and some windows bots.
Diffstat (limited to 'debuginfo-tests/win_cdb')
-rw-r--r--debuginfo-tests/win_cdb/README.txt6
-rw-r--r--debuginfo-tests/win_cdb/global-constant.cpp33
-rw-r--r--debuginfo-tests/win_cdb/hello.c14
-rw-r--r--debuginfo-tests/win_cdb/inline-line-gap.cpp45
-rw-r--r--debuginfo-tests/win_cdb/lit.local.cfg.py2
-rw-r--r--debuginfo-tests/win_cdb/nrvo.cpp49
-rw-r--r--debuginfo-tests/win_cdb/realigned-frame.cpp34
7 files changed, 0 insertions, 183 deletions
diff --git a/debuginfo-tests/win_cdb/README.txt b/debuginfo-tests/win_cdb/README.txt
deleted file mode 100644
index ebb90dfdc1d..00000000000
--- a/debuginfo-tests/win_cdb/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-These are debug info integration tests similar to the ones in the parent
-directory, except that these are designed to test compatibility between clang,
-lld, and cdb, the command line debugger that ships as part of the Microsoft
-Windows SDK. The debugger command language that cdb uses is very different from
-gdb and LLDB, so it's useful to be able to write some tests directly in the cdb
-command language.
diff --git a/debuginfo-tests/win_cdb/global-constant.cpp b/debuginfo-tests/win_cdb/global-constant.cpp
deleted file mode 100644
index 57423bc9b24..00000000000
--- a/debuginfo-tests/win_cdb/global-constant.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// RUN: %clang_cl %s -o %t.exe -fuse-ld=lld -Z7
-// RUN: grep DE[B]UGGER: %s | sed -e 's/.*DE[B]UGGER: //' > %t.script
-// RUN: %cdb -cf %t.script %t.exe | FileCheck %s --check-prefixes=DEBUGGER,CHECK
-
-// Check that global constants have debug info.
-
-const float TestPi = 3.14;
-struct S {
- static const char TestCharA = 'a';
-};
-enum TestEnum : int {
- ENUM_POS = 2147000000,
- ENUM_NEG = -2147000000,
-};
-void useConst(int) {}
-int main() {
- useConst(TestPi);
- useConst(S::TestCharA);
- useConst(ENUM_NEG);
- // DEBUGGER: g
- // DEBUGGER: ?? TestPi
- // CHECK: float 3.140000105
- // DEBUGGER: ?? S::TestCharA
- // CHECK: char 0n97 'a'
- // DEBUGGER: ?? ENUM_NEG
- // CHECK: TestEnum ENUM_NEG (0n-2147000000)
- // Unused constants shouldn't show up in the globals stream.
- // DEBUGGER: ?? ENUM_POS
- // CHECK: Couldn't resolve error at 'ENUM_POS'
- // DEBUGGER: q
- __debugbreak();
- return 0;
-}
diff --git a/debuginfo-tests/win_cdb/hello.c b/debuginfo-tests/win_cdb/hello.c
deleted file mode 100644
index 00a15e8dbed..00000000000
--- a/debuginfo-tests/win_cdb/hello.c
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cl %s -o %t.exe -fuse-ld=lld -Z7
-// RUN: grep DE[B]UGGER: %s | sed -e 's/.*DE[B]UGGER: //' > %t.script
-// RUN: %cdb -cf %t.script %t.exe | FileCheck %s --check-prefixes=DEBUGGER,CHECK
-
-#include <stdio.h>
-int main() {
- printf("hello world\n");
- int x = 42;
- __debugbreak();
- // DEBUGGER: g
- // DEBUGGER: dv
- // CHECK: x = 0n42
-}
-// DEBUGGER: q
diff --git a/debuginfo-tests/win_cdb/inline-line-gap.cpp b/debuginfo-tests/win_cdb/inline-line-gap.cpp
deleted file mode 100644
index 5e0270d08c7..00000000000
--- a/debuginfo-tests/win_cdb/inline-line-gap.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// RUN: %clang_cl -MD -Od %s -o %t.exe -fuse-ld=lld -Z7
-// RUN: grep DE[B]UGGER: %s | sed -e 's/.*DE[B]UGGER: //' > %t.script
-// RUN: %cdb -cf %t.script %t.exe | FileCheck %s --check-prefixes=DEBUGGER,CHECK
-//
-// RUN: %clang_cl -MD -O2 %s -o %t.exe -fuse-ld=lld -Z7
-// RUN: grep DE[B]UGGER: %s | sed -e 's/.*DE[B]UGGER: //' > %t.script
-// RUN: %cdb -cf %t.script %t.exe | FileCheck %s --check-prefixes=DEBUGGER,CHECK
-
-// This code is structured to have an early exit with an epilogue in the middle
-// of the function, which creates a gap between the beginning of the inlined
-// code region and the end. Previously, this confused cdb.
-
-volatile bool shutting_down_ = true;
-volatile bool tearing_down_ = true;
-
-void __attribute__((optnone)) setCrashString(const char *) {}
-void __attribute__((optnone)) doTailCall() {}
-extern "C" void __declspec(noreturn) abort();
-
-void __forceinline inlineCrashFrame() {
- if (shutting_down_ || tearing_down_) {
- setCrashString("crashing");
- __debugbreak();
- // MSVC lays out calls to abort out of line, gets the layout we want.
- abort();
- }
-}
-
-void __declspec(noinline) callerOfInlineCrashFrame(bool is_keeping_alive) {
- if (is_keeping_alive)
- inlineCrashFrame();
- else
- doTailCall();
-}
-
-int __attribute__((optnone)) main() {
- callerOfInlineCrashFrame(true);
-}
-
-// DEBUGGER: g
-// DEBUGGER: k3
-// CHECK: {{.*}}!inlineCrashFrame
-// CHECK: {{.*}}!callerOfInlineCrashFrame
-// CHECK: {{.*}}!main
-// DEBUGGER: q
diff --git a/debuginfo-tests/win_cdb/lit.local.cfg.py b/debuginfo-tests/win_cdb/lit.local.cfg.py
deleted file mode 100644
index e4d61b1fbb6..00000000000
--- a/debuginfo-tests/win_cdb/lit.local.cfg.py
+++ /dev/null
@@ -1,2 +0,0 @@
-# The win_cdb tests are supported when cmake was run in an MSVC environment.
-config.unsupported = not config.is_msvc
diff --git a/debuginfo-tests/win_cdb/nrvo.cpp b/debuginfo-tests/win_cdb/nrvo.cpp
deleted file mode 100644
index 5712118b39c..00000000000
--- a/debuginfo-tests/win_cdb/nrvo.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// This ensures that DW_OP_deref is inserted when necessary, such as when NRVO
-// of a string object occurs in C++.
-//
-// RUN: %clang_cl %s -o %t.exe -fuse-ld=lld -Z7
-// RUN: grep DE[B]UGGER: %s | sed -e 's/.*DE[B]UGGER: //' > %t.script
-// RUN: %cdb -cf %t.script %t.exe | FileCheck %s --check-prefixes=DEBUGGER,CHECK
-//
-
-struct string {
- string() {}
- string(int i) : i(i) {}
- ~string() {}
- int i = 0;
-};
-string get_string() {
- string unused;
- string result = 3;
- __debugbreak();
- return result;
-}
-void some_function(int) {}
-struct string2 {
- string2() = default;
- string2(string2 &&other) { i = other.i; }
- int i;
-};
-string2 get_string2() {
- string2 result;
- result.i = 5;
- some_function(result.i);
- // Test that the debugger can get the value of result after another
- // function is called.
- __debugbreak();
- return result;
-}
-int main() {
- get_string();
- get_string2();
-}
-
-// DEBUGGER: g
-// DEBUGGER: ?? result
-// CHECK: struct string *
-// CHECK: +0x000 i : 0n3
-// DEBUGGER: g
-// DEBUGGER: ?? result
-// CHECK: struct string2 *
-// CHECK: +0x000 i : 0n5
-// DEBUGGER: q
diff --git a/debuginfo-tests/win_cdb/realigned-frame.cpp b/debuginfo-tests/win_cdb/realigned-frame.cpp
deleted file mode 100644
index a964b43e0cb..00000000000
--- a/debuginfo-tests/win_cdb/realigned-frame.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// RUN: %clang_cl %s -o %t.exe -fuse-ld=lld -Z7
-// RUN: grep DE[B]UGGER: %s | sed -e 's/.*DE[B]UGGER: //' > %t.script
-// RUN: %cdb -cf %t.script %t.exe | FileCheck %s --check-prefixes=DEBUGGER,CHECK
-
-// From https://llvm.org/pr38857, where we had issues with stack realignment.
-
-struct Foo {
- int x = 42;
- int __declspec(noinline) foo();
- void __declspec(noinline) bar(int *a, int *b, double *c);
-};
-int Foo::foo() {
- int a = 1;
- int b = 2;
- double __declspec(align(32)) force_alignment = 0.42;
- bar(&a, &b, &force_alignment);
- // DEBUGGER: g
- // DEBUGGER: .frame 1
- // DEBUGGER: dv
- // CHECK: a = 0n1
- // CHECK: b = 0n2
- // CHECK: force_alignment = 0.41999{{.*}}
- // DEBUGGER: q
- x += (int)force_alignment;
- return x;
-}
-void Foo::bar(int *a, int *b, double *c) {
- __debugbreak();
- *c += *a + *b;
-}
-int main() {
- Foo o;
- o.foo();
-}
OpenPOWER on IntegriCloud