Revert "[Dexter] Remove builder from Dexter"

& Revert "[Dexter] Fix incorrect substitution errors in clang-cl builder"

This reverts commits 262520a3c5450fd7f149438245b2aef12736347f,
and 0b72b71cd3c8ad824342c05bc6d9d64d87eeb81b.

Failures occurred on two buildbots, the SIE buildbot:
https://lab.llvm.org/buildbot/#/builders/216/builds/26006

And the green dragon buildbot:
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/59091

Errors appear to be related to incorrect tool substitution in the Dexter
test commands, and a currently unknown error with one of the general
debuginfo tests that uses Dexter.
This commit is contained in:
Stephen Tozer 2023-08-21 18:01:06 +01:00
parent acbe886880
commit 8df9eff90f
129 changed files with 495 additions and 286 deletions

View File

@ -1,9 +1,9 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
//
// RUN: %clang -O0 -g -lstdc++ %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' --cflags "-O0 -g" \
// RUN: --ldflags="-lstdc++" -- %s
// Radar 8945514
class SVal {

View File

@ -8,9 +8,10 @@
// lldb-8, even outside of dexter, will sometimes trigger an asan fault in
// the debugged process and generally freak out.
// RUN: %clang -O1 -glldb -fsanitize=address -arch x86_64 %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-O1 -glldb -fsanitize=address -arch x86_64" \
// RUN: --ldflags="-fsanitize=address" -- %s
#include <deque>
struct A {

View File

@ -3,10 +3,10 @@
// Zorg configures the ASAN stage2 bots to not build the asan
// compiler-rt. Only run this test on non-asanified configurations.
//
// RUN: %clang --driver-mode=gcc -O0 -glldb -fblocks -arch x86_64 \
// RUN: -fsanitize=address %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang-c' --debugger 'lldb' \
// RUN: --cflags "--driver-mode=gcc -O0 -glldb -fblocks -arch x86_64 \
// RUN: -fsanitize=address" --ldflags="-fsanitize=address" -- %s
struct S {
int a[8];

View File

@ -1,9 +1,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
//
// RUN: %clang -O0 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' --cflags "-O0 -glldb" -- %s
class A {
public:

View File

@ -2,9 +2,9 @@
// UNSUPPORTED: system-windows
//
// This test case checks debug info during register moves for an argument.
// RUN: %clang -m64 -mllvm -fast-isel=false -g %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder clang-c --debugger 'lldb' \
// RUN: --cflags "-m64 -mllvm -fast-isel=false -g" -- %s
//
// Radar 8412415

View File

@ -4,9 +4,10 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O0 -g %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -v -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-g -O0" -v -- %s
const int d = 100;

View File

@ -1,7 +1,7 @@
// REQUIRES: system-windows
//
// RUN: %clang_cl /Z7 /Zi %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
// RUN: %dexter --fail-lt 1.0 -w --builder 'clang-cl_vs2015' \
// RUN: --debugger 'dbgeng' --cflags '/Z7 /Zi' --ldflags '/Z7 /Zi' -- %s
// Check that global constants have debug info.

View File

@ -1,7 +1,7 @@
// REQUIRES: system-windows
//
// RUN: %clang_cl /Z7 /Zi %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
// RUN: %dexter --fail-lt 1.0 -w --builder 'clang-cl_vs2015' \
// RUN: --debugger 'dbgeng' --cflags '/Z7 /Zi' --ldflags '/Z7 /Zi' -- %s
#include <stdio.h>
int main() {

View File

@ -1,11 +1,12 @@
// REQUIRES: system-windows
//
// RUN: %clang_cl /Od /Z7 /Zi %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
// RUN: %dexter --fail-lt 1.0 -w --builder 'clang-cl_vs2015' \
// RUN: --debugger 'dbgeng' --cflags '/Od /Z7 /Zi' \
// RUN: --ldflags '/Od /Z7 /Zi' -- %s
//
// RUN: %clang_cl /O2 /Z7 /Zi %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --binary %t \
// RUN: --debugger 'dbgeng' -- %s
// RUN: %dexter --fail-lt 1.0 -w --builder 'clang-cl_vs2015' \
// RUN: --debugger 'dbgeng' --cflags '/O2 /Z7 /Zi' \
// RUN: --ldflags '/O2 /Z7 /Zi' -- %s
// 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

View File

@ -3,8 +3,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O3 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder 'clang-c' --cflags "-O3 -glldb" -- %s
//// Adapted from https://bugs.llvm.org/show_bug.cgi?id=34136#c1
//// LowerDbgDeclare has since been updated to look through bitcasts. We still

View File

@ -3,8 +3,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O3 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder 'clang-c' --cflags "-O3 -glldb" -- %s
//// Adapted from https://bugs.llvm.org/show_bug.cgi?id=34136#c4

View File

@ -1,7 +1,7 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O2 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder clang-c --cflags "-O2 -glldb" -- %s
//// Check that we give good locations to a variable ('local') which is escaped
//// down some control paths and not others. This example is handled well currently.

View File

@ -3,8 +3,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O3 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder 'clang-c' --cflags "-O3 -glldb" -- %s
//// Check that 'param' in 'fun' can be read throughout, and that 'pa' and 'pb'
//// can be dereferenced in the debugger even if we can't provide the pointer

View File

@ -3,8 +3,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O3 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder 'clang-c' --cflags "-O3 -glldb" -- %s
// 1. param is escaped by inlineme(&param) so it is not promoted by
// SROA/mem2reg.

View File

@ -3,8 +3,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O2 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder clang-c --cflags "-O2 -glldb" -- %s
//
//// Check that once-escaped variable 'param' can still be read after we
//// perform inlining + mem2reg, and that we see the DSE'd value 255.

View File

@ -1,7 +1,7 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O2 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder clang-c --cflags "-O2 -glldb" -- %s
//
//// Check that the once-escaped variable 'param' can still be read after
//// we perform inlining + mem2reg. See D89810 and D85555.

View File

@ -3,8 +3,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O3 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder 'clang-c' --cflags "-O3 -glldb" -- %s
//// Check that escaped local 'param' in function 'fun' has sensible debug info
//// after the escaping function 'use' gets arg promotion (int* -> int). Currently

View File

@ -3,8 +3,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O3 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder 'clang-c' --cflags "-O3 -glldb" -- %s
// 1. parama is escaped by esc(&parama) so it is not promoted by
// SROA/mem2reg.

View File

@ -4,8 +4,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O2 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder clang-c --cflags "-O2 -glldb" -- %s
//
//// Check that a pointer to a variable living on the stack dereferences to the
//// variable value.

View File

@ -4,8 +4,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O2 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
// RUN: --builder clang-c --cflags "-O2 -glldb" -- %s
//
//// Check debug-info for the escaped struct variable num is reasonable.

View File

@ -5,8 +5,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -O3 -glldb %s -o %t
// RUN: %dexter --fail-lt 0.1 -w --debugger lldb --binary %t -- %s
// RUN: %dexter --fail-lt 0.1 -w --debugger lldb \
// RUN: --builder 'clang-c' --cflags "-O3 -glldb" -- %s
// See NOTE at end for more info about the RUN command.
// 1. SROA/mem2reg fully promotes parama.

View File

@ -5,9 +5,9 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -g -O0 %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -v -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-g -O0" -v -- %s
#include <stdio.h>

View File

@ -7,13 +7,13 @@
// Zorg configures the ASAN stage2 bots to not build the asan
// compiler-rt. Only run this test on non-asanified configurations.
//
// RUN: %clang -O0 -glldb -fno-exceptions %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-O0 -glldb -fno-exceptions" -- %s
//
// RUN: %clang -O1 -glldb -fno-exceptions %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-O1 -glldb -fno-exceptions" -- %s
//
// PR34513
volatile int sideeffect = 0;

View File

@ -3,8 +3,8 @@
//
// REQUIRES: system-windows
//
// RUN: %clang_cl /Z7 /Zi %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
// RUN: %dexter --fail-lt 1.0 -w --builder 'clang-cl_vs2015' \
// RUN: --debugger 'dbgeng' --cflags '/Z7 /Zi' --ldflags '/Z7 /Zi' -- %s
struct string {
string() {}

View File

@ -1,9 +1,9 @@
// RUN: %clang -O2 -ffast-math -g %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: %clang -O0 -ffast-math -g %s -o %t
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-ffast-math -O2 -g" -- %s
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-ffast-math -O0 -g" -- %s
// REQUIRES: lldb
// UNSUPPORTED: system-windows

View File

@ -5,9 +5,9 @@
// UNSUPPORTED: system-windows
// UNSUPPORTED: system-darwin
// RUN: %clang -O2 -g %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-O2 -g" -- %s
// A simple loop of assignments.
// With optimization level > 0 the compiler reorders basic blocks

View File

@ -1,9 +1,9 @@
// RUN: %clang -O2 -g %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: %clang -O0 -g %s -o %t
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-O2 -g" -- %s
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-O0 -g" -- %s
// REQUIRES: lldb, D136396
// UNSUPPORTED: system-windows

View File

@ -1,9 +1,9 @@
// RUN: %clang++ -O2 -g %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -v -- %s
// RUN: %clang++ -O0 -g %s -o %t
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-g -O2" -v -- %s
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-g -O0" -- %s
// REQUIRES: lldb
// UNSUPPORTED: system-windows

View File

@ -1,9 +1,9 @@
// RUN: %clang++ -O2 -g %s -o %t
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -v -- %s
// RUN: %clang++ -O0 -g %s -o %t
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-g -O2" -v -- %s
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --binary %t --debugger 'lldb' -- %s
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-g -O0" -- %s
// REQUIRES: lldb
// UNSUPPORTED: system-windows

View File

@ -1,7 +1,7 @@
// REQUIRES: system-windows
//
// RUN: %clang_cl /Z7 /Zi %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
// RUN: %dexter --fail-lt 1.0 -w --builder 'clang-cl_vs2015' \
// RUN: --debugger 'dbgeng' --cflags '/Z7 /Zi' --ldflags '/Z7 /Zi' -- %s
// From https://llvm.org/pr38857, where we had issues with stack realignment.

View File

@ -1,8 +1,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
//
// RUN: %clang -O -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'lldb' -- %s
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --builder clang-c --debugger 'lldb' --cflags "-O -glldb" -- %s
void __attribute__((noinline, optnone)) bar(int *test) {}
int main() {

View File

@ -2,8 +2,8 @@
// REQUIRES: lldb
// UNSUPPORTED: system-windows
//
// RUN: %clang -O0 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'lldb' -- %s
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --builder clang-c --debugger 'lldb' --cflags "-O0 -glldb" -- %s
void init_vla(int size) {
int i;

View File

@ -33,15 +33,13 @@ DExTer is current compatible with 'clang' and 'clang-cl' compiler drivers. The
## Running a test case
The following commands build fibonacci.cpp from the tests/nostdlib directory and run it in LLDB, reporting the debug experience heuristic. The first pair of commands build with no optimizations (-O0) and score 1.0000. The second pair of commands build with optimizations (-O2) and score 0.2832 which suggests a worse debugging experience.
The following DExTer commands build the test.cpp from the tests/nostdlib/fibonacci directory and quietly runs it on the Visual Studio debugger, reporting the debug experience heuristic. The first command builds with no optimizations (/Od) and scores 1.0000. The second command builds with optimizations (/Ox) and scores 0.2832 which suggests a worse debugging experience.
clang -O0 -g tests/nostdlib/fibonacci.cpp -o tests/nostdlib/fibonacci/test
dexter.py test --binary tests/nostdlib/fibonacci/test --debugger lldb -- tests/nostdlib/fibonacci/test.cpp
test.cpp = (1.0000)
dexter.py test --builder clang-cl_vs2015 --debugger vs2017 --cflags="/Od /Zi" --ldflags="/Zi" -- tests/nostdlib/fibonacci
fibonacci = (1.0000)
clang -O2 -g tests/nostdlib/fibonacci/test.cpp -o tests/nostdlib/fibonacci/test
dexter.py test --binary tests/nostdlib/fibonacci/test --debugger lldb -- tests/nostdlib/fibonacci/test.cpp
test.cpp = (0.2832)
dexter.py test --builder clang-cl_vs2015 --debugger vs2017 --cflags="/Ox /Zi" --ldflags="/Zi" -- tests/nostdlib/fibonacci
fibonacci = (0.2832)
## An example test case
@ -109,9 +107,9 @@ to step into a file outside of the test directory.
## Detailed DExTer reports
Running the command below launches the tests/nostdlib/fibonacci test case in DExTer, using LLDB as the debugger and producing a detailed report:
Running the command below launches the tests/nostdlib/fibonacci test case in DExTer, using clang-cl as the compiler, Visual Studio 2017 as the debugger, and producing a detailed report:
$ dexter.py test --vs-solution clang-cl_vs2015 --debugger vs2017 --cflags="/Ox /Zi" --ldflags="/Zi" -v -- tests/nostdlib/fibonacci
$ dexter.py test --builder clang-cl_vs2015 --debugger vs2017 --cflags="/Ox /Zi" --ldflags="/Zi" -v -- tests/nostdlib/fibonacci
The detailed report is enabled by `-v` and shows a breakdown of the information from each debugger step. For example:
@ -257,4 +255,50 @@ shows that for `first` the expected values 0, 1, 2 and 3 were seen, 5 was not.
## Writing new test cases
Each test can be either embedded within the source file using comments or included as a separate file with the .dex extension. Dexter does not include support for building test cases, although if a Visual Studio Solution (.sln) is used as the test file, VS will build the program as part of launching a debugger session if it has not already been built.
Each test requires a `test.cfg` file. Currently the contents of this file are not read, but its presence is used to determine the root directory of a test. In the future, configuration variables for the test such as supported language modes may be stored in this file. Use the various [commands](Commands.md) to encode debugging expectations.
## Additional tools
For clang-based compilers, the `clang-opt-bisect` tool can be used to get a breakdown of which LLVM passes may be contributing to debugging experience issues. For example:
$ dexter.py clang-opt-bisect tests/nostdlib/fibonacci --builder clang-cl --debugger vs2017 --cflags="/Ox /Zi" --ldflags="/Zi"
pass 1/211 = (1.0000) (0.0000) [Simplify the CFG on function (?Fibonacci@@YAXHAEAH@Z)]
pass 2/211 = (0.7611) (-0.2389) [SROA on function (?Fibonacci@@YAXHAEAH@Z)]
pass 3/211 = (0.7611) (0.0000) [Early CSE on function (?Fibonacci@@YAXHAEAH@Z)]
pass 4/211 = (0.7611) (0.0000) [Simplify the CFG on function (main)]
pass 5/211 = (0.7611) (0.0000) [SROA on function (main)]
pass 6/211 = (0.7611) (0.0000) [Early CSE on function (main)]
pass 7/211 = (0.7611) (0.0000) [Infer set function attributes on module (c:\dexter\tests\fibonacci\test.cpp)]
pass 8/211 = (0.7611) (0.0000) [Interprocedural Sparse Conditional Constant Propagation on module (c:\dexter\tests\fibonacci\test.cpp)]
pass 9/211 = (0.7611) (0.0000) [Called Value Propagation on module (c:\dexter\tests\fibonacci\test.cpp)]
pass 10/211 = (0.7611) (0.0000) [Global Variable Optimizer on module (c:\dexter\tests\fibonacci\test.cpp)]
pass 11/211 = (0.7611) (0.0000) [Promote Memory to Register on function (?Fibonacci@@YAXHAEAH@Z)]
pass 12/211 = (0.7611) (0.0000) [Promote Memory to Register on function (main)]
pass 13/211 = (0.7611) (0.0000) [Dead Argument Elimination on module (c:\dexter\tests\fibonacci\test.cpp)]
pass 14/211 = (0.7611) (0.0000) [Combine redundant instructions on function (?Fibonacci@@YAXHAEAH@Z)]
pass 15/211 = (0.7611) (0.0000) [Simplify the CFG on function (?Fibonacci@@YAXHAEAH@Z)]a
pass 16/211 = (0.7345) (-0.0265) [Combine redundant instructions on function (main)]
pass 17/211 = (0.7345) (0.0000) [Simplify the CFG on function (main)]
pass 18/211 = (0.7345) (0.0000) [Remove unused exception handling info on SCC (?Fibonacci@@YAXHAEAH@Z)]
pass 19/211 = (0.7345) (0.0000) [Function Integration/Inlining on SCC (?Fibonacci@@YAXHAEAH@Z)]
pass 20/211 = (0.7345) (0.0000) [Deduce function attributes on SCC (?Fibonacci@@YAXHAEAH@Z)]
pass 21/211 = (0.7345) (0.0000) [SROA on function (?Fibonacci@@YAXHAEAH@Z)]
pass 22/211 = (0.7345) (0.0000) [Early CSE w/ MemorySSA on function (?Fibonacci@@YAXHAEAH@Z)]
pass 23/211 = (0.7345) (0.0000) [Speculatively execute instructions if target has divergent branches on function (?Fibonacci@@YAXHAEAH@Z)]
pass 24/211 = (0.7345) (0.0000) [Jump Threading on function (?Fibonacci@@YAXHAEAH@Z)]
pass 25/211 = (0.7345) (0.0000) [Value Propagation on function (?Fibonacci@@YAXHAEAH@Z)]
pass 26/211 = (0.7345) (0.0000) [Simplify the CFG on function (?Fibonacci@@YAXHAEAH@Z)]
pass 27/211 = (0.7345) (0.0000) [Combine redundant instructions on function (?Fibonacci@@YAXHAEAH@Z)]
pass 28/211 = (0.7345) (0.0000) [Tail Call Elimination on function (?Fibonacci@@YAXHAEAH@Z)]
pass 29/211 = (0.7345) (0.0000) [Simplify the CFG on function (?Fibonacci@@YAXHAEAH@Z)]
pass 30/211 = (0.7345) (0.0000) [Reassociate expressions on function (?Fibonacci@@YAXHAEAH@Z)]
pass 31/211 = (0.8673) (0.1327) [Rotate Loops on loop]
pass 32/211 = (0.5575) (-0.3097) [Loop Invariant Code Motion on loop]
pass 33/211 = (0.5575) (0.0000) [Unswitch loops on loop]
pass 34/211 = (0.5575) (0.0000) [Simplify the CFG on function (?Fibonacci@@YAXHAEAH@Z)]
pass 35/211 = (0.5575) (0.0000) [Combine redundant instructions on function (?Fibonacci@@YAXHAEAH@Z)]
pass 36/211 = (0.5575) (0.0000) [Induction Variable Simplification on loop]
pass 37/211 = (0.5575) (0.0000) [Recognize loop idioms on loop]
<output-snipped>

View File

@ -24,6 +24,7 @@ def _quotify(text):
def _get_script_environment(
source_files, compiler_options, linker_options, executable_file
):
source_files = [_quotify(f) for f in source_files]
object_files = [_quotify("{}.o".format(os.path.basename(f))) for f in source_files]
source_indexes = ["{:02d}".format(i + 1) for i in range(len(source_files))]

View File

@ -0,0 +1,10 @@
# DExTer : Debugging Experience Tester
# ~~~~~~ ~ ~~ ~ ~~
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
from dex.builder.Builder import run_external_build_script
from dex.builder.ParserOptions import add_builder_tool_arguments
from dex.builder.ParserOptions import handle_builder_tool_options

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
if test -z "$PATHTOCLANG"; then
PATHTOCLANG=clang
fi
for INDEX in $SOURCE_INDEXES
do
CFLAGS=$(eval echo "\$COMPILER_OPTIONS_$INDEX")
SRCFILE=$(eval echo "\$SOURCE_FILE_$INDEX")
OBJFILE=$(eval echo "\$OBJECT_FILE_$INDEX")
$PATHTOCLANG -std=gnu11 -c $CFLAGS $SRCFILE -o $OBJFILE
done
$PATHTOCLANG $LINKER_OPTIONS $OBJECT_FILES -o $EXECUTABLE_FILE

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
if test -z "$PATHTOCLANGPP"; then
PATHTOCLANGPP=clang++
fi
for INDEX in $SOURCE_INDEXES
do
CFLAGS=$(eval echo "\$COMPILER_OPTIONS_$INDEX")
SRCFILE=$(eval echo "\$SOURCE_FILE_$INDEX")
OBJFILE=$(eval echo "\$OBJECT_FILE_$INDEX")
$PATHTOCLANGPP -std=gnu++11 -c $CFLAGS $SRCFILE -o $OBJFILE
done
$PATHTOCLANGPP $LINKER_OPTIONS $OBJECT_FILES -o $EXECUTABLE_FILE

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
if test -z "$PATHTOGCC"; then
PATHTOGCC=gcc
fi
for INDEX in $SOURCE_INDEXES
do
CFLAGS=$(eval echo "\$COMPILER_OPTIONS_$INDEX")
SRCFILE=$(eval echo "\$SOURCE_FILE_$INDEX")
OBJFILE=$(eval echo "\$OBJECT_FILE_$INDEX")
$PATHTOGCC -std=gnu++11 -c $CFLAGS $SRCFILE -o $OBJFILE
done
$PATHTOGCC $LINKER_OPTIONS $OBJECT_FILES -o $EXECUTABLE_FILE

View File

@ -0,0 +1,23 @@
@echo OFF
setlocal EnableDelayedExpansion
call "%VS140COMNTOOLS%..\..\VC\bin\amd64\vcvars64.bat"
@echo OFF
setlocal EnableDelayedExpansion
for %%I in (%SOURCE_INDEXES%) do (
%PATHTOCLANGCL% /c !COMPILER_OPTIONS_%%I! !SOURCE_FILE_%%I! /Fo!OBJECT_FILE_%%I!
if errorlevel 1 goto :FAIL
)
%PATHTOCLANGCL% %LINKER_OPTIONS% %OBJECT_FILES% /Fe%EXECUTABLE_FILE%
if errorlevel 1 goto :FAIL
goto :END
:FAIL
echo FAILED
exit /B 1
:END
exit /B 0

View File

@ -0,0 +1,17 @@
@setlocal EnableDelayedExpansion
for %%I in (%SOURCE_INDEXES%) do (
%PATHTOCLANGPP% -fuse-ld=lld -c !COMPILER_OPTIONS_%%I! !SOURCE_FILE_%%I! -o !OBJECT_FILE_%%I!
if errorlevel 1 goto :FAIL
)
%PATHTOCLANGPP% -fuse-ld=lld %LINKER_OPTIONS% %OBJECT_FILES% -o %EXECUTABLE_FILE%
if errorlevel 1 goto :FAIL
goto :END
:FAIL
echo FAILED
exit /B 1
:END
exit /B 0

View File

@ -15,6 +15,7 @@ from dex.command.CommandBase import CommandBase, StepExpectInfo
class DexDeclareAddress(CommandBase):
def __init__(self, addr_name, expression, **kwargs):
if not isinstance(addr_name, str):
raise TypeError("invalid argument type")

View File

@ -14,6 +14,7 @@ from dex.command.CommandBase import CommandBase
class DexDeclareFile(CommandBase):
def __init__(self, declared_file):
if not isinstance(declared_file, str):
raise TypeError("invalid argument type")

View File

@ -13,6 +13,7 @@ from dex.command.CommandBase import CommandBase
class DexLabel(CommandBase):
def __init__(self, label, **kwargs):
if not isinstance(label, str):
raise TypeError("invalid argument type")

View File

@ -164,6 +164,7 @@ class ConditionalController(DebuggerControllerBase):
total_timeout = Timeout(self.context.options.timeout_total)
while not self.debugger.is_finished:
breakpoint_timeout = Timeout(self.context.options.timeout_breakpoint)
while self.debugger.is_running and not timed_out:
# Check to see whether we've timed out while we're waiting.

View File

@ -96,6 +96,7 @@ class DefaultController(DebuggerControllerBase):
total_timeout = Timeout(self.context.options.timeout_total)
max_steps = self.context.options.max_steps
for _ in range(max_steps):
breakpoint_timeout = Timeout(self.context.options.timeout_breakpoint)
while self.debugger.is_running and not timed_out:
# Check to see whether we've timed out while we're waiting.

View File

@ -40,6 +40,7 @@ VSBreakpoint = namedtuple("VSBreakpoint", "path, line, col, cond")
class VisualStudio(
DebuggerBase, metaclass=abc.ABCMeta
): # pylint: disable=abstract-method
# Constants for results of Debugger.CurrentMode
# (https://msdn.microsoft.com/en-us/library/envdte.debugger.currentmode.aspx)
dbgDesignMode = 1

View File

@ -8,6 +8,7 @@ from collections import OrderedDict
import os
from typing import List
from dex.dextIR.BuilderIR import BuilderIR
from dex.dextIR.DebuggerIR import DebuggerIR
from dex.dextIR.StepIR import StepIR, StepKind
@ -46,12 +47,14 @@ class DextIR:
dexter_version: str,
executable_path: str,
source_paths: List[str],
builder: BuilderIR = None,
debugger: DebuggerIR = None,
commands: OrderedDict = None,
):
self.dexter_version = dexter_version
self.executable_path = executable_path
self.source_paths = source_paths
self.builder = builder
self.debugger = debugger
self.commands = commands
self.steps: List[StepIR] = []

View File

@ -7,6 +7,7 @@
"""dextIR: DExTer Intermediate Representation of DExTer's debugger trace output.
"""
from dex.dextIR.BuilderIR import BuilderIR
from dex.dextIR.DextIR import DextIR
from dex.dextIR.DebuggerIR import DebuggerIR
from dex.dextIR.FrameIR import FrameIR

View File

@ -66,6 +66,7 @@ def get_tools_directory():
def get_tool_names():
"""Returns a list of expected DExTer Tools"""
return [
"clang-opt-bisect",
"help",
"list-debuggers",
"no-tool-",
@ -192,6 +193,7 @@ class Context(object):
def main() -> ReturnCode:
context = Context()
with PrettyOutput() as context.o:

View File

@ -4,13 +4,15 @@
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Base class for subtools that run tests."""
"""Base class for subtools that do build/run tests."""
import abc
from datetime import datetime
import os
import sys
from dex.builder import add_builder_tool_arguments
from dex.builder import handle_builder_tool_options
from dex.debugger.Debuggers import add_debugger_tool_arguments
from dex.debugger.Debuggers import handle_debugger_tool_options
from dex.heuristic.Heuristic import add_heuristic_tool_arguments
@ -20,26 +22,15 @@ from dex.utils.Exceptions import Error, ToolArgumentError
from dex.utils.ReturnCode import ReturnCode
def add_executable_arguments(parser):
executable_group = parser.add_mutually_exclusive_group(required=True)
executable_group.add_argument(
"--binary", metavar="<file>", help="provide binary file to debug"
)
executable_group.add_argument(
"--vs-solution",
metavar="<file>",
help="provide a path to an already existing visual studio solution.",
)
class TestToolBase(ToolBase):
def __init__(self, *args, **kwargs):
super(TestToolBase, self).__init__(*args, **kwargs)
self.build_script: str = None
def add_tool_arguments(self, parser, defaults):
parser.description = self.__doc__
add_builder_tool_arguments(parser)
add_debugger_tool_arguments(parser, self.context, defaults)
add_executable_arguments(parser)
add_heuristic_tool_arguments(parser)
parser.add_argument(
@ -62,6 +53,12 @@ class TestToolBase(ToolBase):
def handle_options(self, defaults):
options = self.context.options
if not options.builder and (options.cflags or options.ldflags):
self.context.logger.warning(
"--cflags and --ldflags will be ignored when not using --builder",
enable_prefix=True,
)
if options.vs_solution:
options.vs_solution = os.path.abspath(options.vs_solution)
if not os.path.isfile(options.vs_solution):
@ -76,6 +73,11 @@ class TestToolBase(ToolBase):
raise Error(
'<d>could not find binary file</> <r>"{}"</>'.format(options.binary)
)
else:
try:
self.build_script = handle_builder_tool_options(self.context)
except ToolArgumentError as e:
raise Error(e)
try:
handle_debugger_tool_options(self.context, defaults)
@ -111,14 +113,37 @@ class TestToolBase(ToolBase):
)
# Test files contain dexter commands.
options.test_files = [options.test_path]
# Source files are the files that the program was built from, and are
# used to determine whether a breakpoint is external to the program
# (e.g. into a system header) or not.
options.test_files = []
# Source files are to be compiled by the builder script and may also
# contains dexter commands.
options.source_files = []
if not options.test_path.endswith(".dex"):
options.source_files = [options.test_path]
self._run_test(self._get_test_name(options.test_path))
if os.path.isdir(options.test_path):
subdirs = sorted(
[r for r, _, f in os.walk(options.test_path) if "test.cfg" in f]
)
for subdir in subdirs:
for f in os.listdir(subdir):
# TODO: read file extensions from the test.cfg file instead so
# that this isn't just limited to C and C++.
file_path = os.path.normcase(os.path.join(subdir, f))
if f.endswith(".cpp"):
options.source_files.append(file_path)
elif f.endswith(".c"):
options.source_files.append(file_path)
elif f.endswith(".dex"):
options.test_files.append(file_path)
# Source files can contain dexter commands too.
options.test_files = options.test_files + options.source_files
self._run_test(self._get_test_name(subdir))
else:
# We're dealing with a direct file path to a test file. If the file is non
# .dex, then it must be a source file.
if not options.test_path.endswith(".dex"):
options.source_files = [options.test_path]
options.test_files = [options.test_path]
self._run_test(self._get_test_name(options.test_path))
return self._handle_results()

View File

@ -0,0 +1,8 @@
# DExTer : Debugging Experience Tester
# ~~~~~~ ~ ~~ ~ ~~
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
from dex.tools.clang_opt_bisect.Tool import Tool

View File

@ -12,6 +12,7 @@ import csv
import pickle
import shutil
from dex.builder import run_external_build_script
from dex.command.ParseCommand import get_command_infos
from dex.debugger.Debuggers import run_debugger_subprocess
from dex.debugger.DebuggerControllers.DefaultController import DefaultController
@ -23,6 +24,7 @@ from dex.utils.Exceptions import DebuggerException
from dex.utils.Exceptions import BuildScriptException, HeuristicException
from dex.utils.PrettyOutputBase import Stream
from dex.utils.ReturnCode import ReturnCode
from dex.dextIR import BuilderIR
class TestCase(object):
@ -107,6 +109,36 @@ class Tool(TestToolBase):
)
super(Tool, self).add_tool_arguments(parser, defaults)
def _build_test_case(self):
"""Build an executable from the test source with the given --builder
script and flags (--cflags, --ldflags) in the working directory.
Or, if the --binary option has been given, copy the executable provided
into the working directory and rename it to match the --builder output
or skip if --vs-solution was passed on the command line.
"""
if self.context.options.vs_solution:
return
options = self.context.options
if options.binary:
# Copy user's binary into the tmp working directory
shutil.copy(options.binary, options.executable)
builderIR = BuilderIR(name="binary", cflags=[options.binary], ldflags="")
else:
options = self.context.options
compiler_options = [options.cflags for _ in options.source_files]
linker_options = options.ldflags
_, _, builderIR = run_external_build_script(
self.context,
script_path=self.build_script,
source_files=options.source_files,
compiler_options=compiler_options,
linker_options=linker_options,
executable_file=options.executable,
)
return builderIR
def _init_debugger_controller(self):
step_collection = DextIR(
executable_path=self.context.options.executable,
@ -127,13 +159,14 @@ class Tool(TestToolBase):
return debugger_controller
def _get_steps(self):
def _get_steps(self, builderIR):
"""Generate a list of debugger steps from a test case."""
debugger_controller = self._init_debugger_controller()
debugger_controller = run_debugger_subprocess(
debugger_controller, self.context.working_directory.path
)
steps = debugger_controller.step_collection
steps.builder = builderIR
return steps
def _get_results_basename(self, test_name):
@ -216,12 +249,8 @@ class Tool(TestToolBase):
result internally in self._test_cases.
"""
try:
if self.context.options.binary:
# Copy user's binary into the tmp working directory.
shutil.copy(
self.context.options.binary, self.context.options.executable
)
steps = self._get_steps()
builderIR = self._build_test_case()
steps = self._get_steps(builderIR)
self._record_steps(test_name, steps)
heuristic_score = Heuristic(self.context, steps)
self._record_score(test_name, heuristic_score)

View File

@ -27,6 +27,7 @@ class _CONSOLE_SCREEN_BUFFER_INFO(ctypes.Structure):
class PrettyOutput(PrettyOutputBase):
stdout = Stream(sys.stdout, ctypes.windll.kernel32.GetStdHandle(-11))
stderr = Stream(sys.stderr, ctypes.windll.kernel32.GetStdHandle(-12))

View File

@ -5,8 +5,7 @@
// UNSUPPORTED: system-darwin
//
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: dex_declare_file.cpp
int main() {

View File

@ -4,8 +4,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_program_state.cpp:
int GCD(int lhs, int rhs)

View File

@ -4,8 +4,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_step_kinds.cpp:
int abs(int i){

View File

@ -4,8 +4,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_step_order.cpp:
int main()

View File

@ -9,8 +9,7 @@
// TODO: Reduce this test's coverage and be more specific about
// expected behaviour.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_watch_type.cpp:
template<class T>

View File

@ -5,8 +5,7 @@
// UNSUPPORTED: system-darwin
//
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_watch_value.cpp:
int main()

View File

@ -4,8 +4,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: float_range_out_range.cpp:
int main() {

View File

@ -4,8 +4,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: float_range_zero_nonmatch.cpp:
int main() {

View File

@ -5,8 +5,7 @@
// The dbgeng driver doesn't support \DexDeclareAddress yet.
// UNSUPPORTED: system-windows
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: missing_dex_address.cpp
int main() {

View File

@ -5,8 +5,7 @@
// UNSUPPORTED: system-darwin
//
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: unreachable.cpp:
int

View File

@ -5,8 +5,7 @@
// UNSUPPORTED: system-darwin
//
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: unreachable_line_range.cpp:
int

View File

@ -5,8 +5,7 @@
// UNSUPPORTED: system-darwin
//
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: not %dexter_regression_test -- %s | FileCheck %s
// CHECK: unreachable_on_line.cpp:
int

View File

@ -1,8 +1,7 @@
// The dbgeng driver doesn't support \DexCommandLine yet.
// UNSUPPORTED: system-windows
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: command_line.c:
int main(int argc, const char **argv) {

View File

@ -2,8 +2,7 @@
// Test that a \DexDeclareAddress value can have its value defined after
// the first reference to that value.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: address_after_ref.cpp
int main() {

View File

@ -4,8 +4,7 @@
// expression after the target line has been stepped on a given number of
// times.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: address_hit_count.cpp
int main() {

View File

@ -2,8 +2,7 @@
// Test that a \DexDeclareAddress value can be used to compare the
// addresses of two local variables that refer to the same address.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: expression_address.cpp
int main() {

View File

@ -2,8 +2,7 @@
// Test that a \DexDeclareAddress value can be used to compare two equal
// pointer variables.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: identical_address.cpp
int main() {

View File

@ -2,8 +2,7 @@
// Test that multiple \DexDeclareAddress references that point to different
// addresses can be used within a single \DexExpectWatchValue.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: multiple_address.cpp
int main() {

View File

@ -2,8 +2,7 @@
// Test that a \DexDeclareAddress value can be used to compare two pointer
// variables that have a fixed offset between them.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: offset_address.cpp
int main() {

View File

@ -2,8 +2,7 @@
// Test that a \DexDeclareAddress value can be used to check the change in
// value of a variable over time, relative to its initial value.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: self_comparison.cpp
int main() {

View File

@ -6,8 +6,7 @@
// UNSUPPORTED: system-darwin
//
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %S | FileCheck %s
// CHECK: dex_and_source
int main() {

View File

@ -4,7 +4,7 @@
#
# UNSUPPORTED: system-darwin
#
# RUN: %dexter_regression_test_build %S/test.cpp -o %t
# RUN: %clang %S/test.cpp -O0 -g -o %t
# RUN: %dexter_regression_base --binary %t %s | FileCheck %s
# CHECK: commands.dex
#

View File

@ -3,7 +3,7 @@
#
# REQUIRES: system-windows
#
# RUN: %dexter_regression_test_build "%S/source/test file.cpp" -o %t
# RUN: %clang "%S/source/test file.cpp" -O0 -g -o %t
# RUN: %dexter_regression_base --binary %t %s | FileCheck %s
# CHECK: test.dex
#

View File

@ -6,8 +6,7 @@
// condition (x == 5) is satisfied.
// Tests using the default controller (no \DexLimitSteps).
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: default_conditional.cpp
int main() {

View File

@ -7,8 +7,7 @@
// given number of times.
// Tests using the default controller (no \DexLimitSteps).
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: default_conditional_hit_count.cpp
int main() {

View File

@ -4,8 +4,7 @@
// specific number of times.
// Tests using the default controller (no \DexLimitSteps).
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: default_hit_count.cpp
int main() {

View File

@ -4,8 +4,7 @@
// is stepped on.
// Tests using the default controller (no \DexLimitSteps).
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: default_simple.cpp
int main() {

View File

@ -7,8 +7,7 @@
// The dbgeng driver doesn't support \DexLimitSteps yet.
// UNSUPPORTED: system-windows
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: limit_steps_conditional.cpp
int main() {

View File

@ -8,8 +8,7 @@
// The dbgeng driver doesn't support \DexLimitSteps yet.
// UNSUPPORTED: system-windows
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: limit_steps_conditional_hit_count.cpp
int main() {

View File

@ -7,8 +7,7 @@
// The dbgeng driver doesn't support \DexLimitSteps yet.
// UNSUPPORTED: system-windows
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: limit_steps_hit_count.cpp
int main() {

View File

@ -7,8 +7,7 @@
// The dbgeng driver doesn't support \DexLimitSteps yet.
// UNSUPPORTED: system-windows, system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: limit_steps_simple.cpp
int main() {

View File

@ -5,8 +5,7 @@
// UNSUPPORTED: system-darwin
//
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_program_state.cpp:
int GCD(int lhs, int rhs)

View File

@ -10,8 +10,7 @@
// TODO: The dbgeng debugger does not support column step reporting at present.
// XFAIL: system-windows
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: direction.cpp:
int func(int i) {

View File

@ -5,8 +5,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: func.cpp:
int func(int i) {

View File

@ -8,8 +8,7 @@
// This fails right now on my linux and windows machine, needs examining as to
// why.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: func_external.cpp:
#include <cstdlib>

View File

@ -5,8 +5,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: recursive.cpp:
int func(int i) {

View File

@ -5,8 +5,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: small_loop.cpp:
int func(int i){

View File

@ -4,11 +4,10 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_step_order.cpp:
int main() // DexLabel('main')
int main()
{
volatile int a = 1; // DexExpectStepOrder(1)
volatile int b = 1; // DexExpectStepOrder(2)
@ -20,6 +19,6 @@ int main() // DexLabel('main')
return 0;
}
// DexExpectStepOrder(4, on_line=ref('main')+6);
// DexExpectStepOrder(5, on_line=ref('main')+7);
// DexExpectStepOrder(6, on_line=ref('main')+8);
// DexExpectStepOrder(4, on_line=16);
// DexExpectStepOrder(5, on_line=17);
// DexExpectStepOrder(6, on_line=18);

View File

@ -8,8 +8,7 @@
// in the same manner as LLDB.
// XFAIL: system-windows
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_watch_type.cpp:
template<class T>

View File

@ -4,8 +4,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: expect_watch_value.cpp:
unsigned long Factorial(int n) {

View File

@ -4,8 +4,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: float_range_multiple.cpp:
int main() {

View File

@ -7,8 +7,7 @@
// work for both dbgeng and lldb, which output floats differently.
// UNSUPPORTED: system-darwin, system-windows
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: float_range_no_arg.cpp:
int main() {

View File

@ -4,8 +4,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: float_range_small.cpp:
int main() {

View File

@ -3,8 +3,7 @@
//
// UNSUPPORTED: system-darwin
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: float_range_zero_match.cpp:
int main() {

View File

@ -2,8 +2,7 @@
// Test that \DexLimitSteps keyword argument hit_count correctly limits
// the number of times the command can trigger.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: hit_count.cpp
int a;

View File

@ -1,8 +1,7 @@
// Purpose:
// Check number of step lines are correctly reported in json output.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t --verbose -- %s | FileCheck %s
// RUN: %dexter_regression_test --verbose -- %s | FileCheck %s
// CHECK: limit_steps_check_json_step_count.cpp
// CHECK: ## BEGIN ##
// CHECK-COUNT-3: json_step_count.cpp",

View File

@ -2,8 +2,7 @@
// Check the DexLimit steps only gathers step info for 2 iterations of a
// for loop.
//
// RUN: %dexter_regression_test_build %s -o %t
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
// RUN: %dexter_regression_test -- %s | FileCheck %s
// CHECK: limit_steps_expect_loop.cpp:
int main(const int argc, const char * argv[]) {

Some files were not shown because too many files have changed in this diff Show More