This is an initial prototype of how we can run debugger integration tests on Windows. cdb and windbg share a command language and debugger engine. Visual Studio has its own, but we should at least be able to use cdb as the basis for optimized debug info integration tests. There's a lot of work to do here still. For example: - Make fewer assumptions about the SDK location - Don't assume x64 (important, I need x86 testing) - More environment isolation, have lit setup vcvars instead of passing LIB and INCLUDE down. - Write a .py file to replace the grep+sed RUN line But, this seemed like a good enough concept to commit as is, since it's useful to me already. Reviewers: aprantl, zturner Differential Revision: https://reviews.llvm.org/D54187 llvm-svn: 361889
15 lines
364 B
C
15 lines
364 B
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
|
|
|
|
#include <stdio.h>
|
|
int main() {
|
|
printf("hello world\n");
|
|
int x = 42;
|
|
__debugbreak();
|
|
// DEBUGGER: g
|
|
// DEBUGGER: dv
|
|
// CHECK: x = 0n42
|
|
}
|
|
// DEBUGGER: q
|