Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reapply "Import Dexter to debuginfo-tests""
This reverts commit cb935f3. Discussion in D68708 advises that green dragon is being briskly refurbished, and it's good to have this patch up testing it.
- Loading branch information
Showing
166 changed files
with
9,920 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// REQUIRES: system-linux, lldb | ||
// | ||
// RUN: %dexter --fail-lt 1.0 -w \ | ||
// RUN: --builder 'clang' --debugger 'lldb' --cflags "-O0 -g" \ | ||
// RUN: --ldflags="-lstdc++" -- %s | ||
// Radar 8945514 | ||
|
||
class SVal { | ||
public: | ||
~SVal() {} | ||
const void* Data; | ||
unsigned Kind; | ||
}; | ||
|
||
void bar(SVal &v) {} | ||
class A { | ||
public: | ||
void foo(SVal v) { bar(v); } // DexLabel('foo') | ||
}; | ||
|
||
int main() { | ||
SVal v; | ||
v.Data = 0; | ||
v.Kind = 2142; | ||
A a; | ||
a.foo(v); | ||
return 0; | ||
} | ||
|
||
/* | ||
DexExpectProgramState({ | ||
'frames': [ | ||
{ | ||
'location': { 'lineno': 'foo' }, | ||
'watches': { | ||
'v.Data == 0': 'true', | ||
'v.Kind': '2142' | ||
} | ||
} | ||
] | ||
}) | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// REQUIRES: !asan, system-linux, lldb | ||
// Zorg configures the ASAN stage2 bots to not build the asan | ||
// compiler-rt. Only run this test on non-asanified configurations. | ||
// UNSUPPORTED: apple-lldb-pre-1000 | ||
|
||
// XFAIL: lldb | ||
// lldb-8, even outside of dexter, will sometimes trigger an asan fault in | ||
// the debugged process and generally freak out. | ||
|
||
// RUN: %dexter --fail-lt 1.0 -w \ | ||
// RUN: --builder 'clang' --debugger 'lldb' \ | ||
// RUN: --cflags "-O1 -glldb -fsanitize=address -arch x86_64" \ | ||
// RUN: --ldflags="-fsanitize=address" -- %s | ||
#include <deque> | ||
|
||
struct A { | ||
int a; | ||
A(int a) : a(a) {} | ||
A() : a(0) {} | ||
}; | ||
|
||
using deq_t = std::deque<A>; | ||
|
||
template class std::deque<A>; | ||
|
||
static void __attribute__((noinline, optnone)) escape(deq_t &deq) { | ||
static volatile deq_t *sink; | ||
sink = &deq; | ||
} | ||
|
||
int main() { | ||
deq_t deq; | ||
deq.push_back(1234); | ||
deq.push_back(56789); | ||
escape(deq); // DexLabel('first') | ||
while (!deq.empty()) { | ||
auto record = deq.front(); | ||
deq.pop_front(); | ||
escape(deq); // DexLabel('second') | ||
} | ||
} | ||
|
||
// DexExpectWatchValue('deq[0].a', '1234', on_line='first') | ||
// DexExpectWatchValue('deq[1].a', '56789', on_line='first') | ||
|
||
// DexExpectWatchValue('deq[0].a', '56789', '0', on_line='second') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// REQUIRES: !asan, system-linux, lldb | ||
// Zorg configures the ASAN stage2 bots to not build the asan | ||
// compiler-rt. Only run this test on non-asanified configurations. | ||
// | ||
// RUN: %dexter --fail-lt 1.0 -w \ | ||
// 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]; | ||
}; | ||
|
||
int f(struct S s, unsigned i) { | ||
return s.a[i]; // DexLabel('asan') | ||
} | ||
|
||
int main(int argc, const char **argv) { | ||
struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}}; | ||
if (f(s, 4) == 4) | ||
return f(s, 0); | ||
return 0; | ||
} | ||
|
||
// DexExpectWatchValue('s.a[0]', '0', on_line='asan') | ||
// DexExpectWatchValue('s.a[1]', '1', on_line='asan') | ||
// DexExpectWatchValue('s.a[7]', '7', on_line='asan') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// REQUIRES: system-linux, lldb | ||
// | ||
// RUN: %dexter --fail-lt 1.0 -w \ | ||
// RUN: --builder 'clang' --debugger 'lldb' --cflags "-O0 -glldb" -- %s | ||
|
||
class A { | ||
public: | ||
A() : zero(0), data(42) { // DexLabel('ctor_start') | ||
} | ||
private: | ||
int zero; | ||
int data; | ||
}; | ||
|
||
int main() { | ||
A a; | ||
return 0; | ||
} | ||
|
||
|
||
/* | ||
DexExpectProgramState({ | ||
'frames': [ | ||
{ | ||
'location': { | ||
'lineno': 'ctor_start' | ||
}, | ||
'watches': { | ||
'*this': {'is_irretrievable': False} | ||
} | ||
} | ||
] | ||
}) | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// REQUIRES: system-windows | ||
// | ||
// 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. | ||
|
||
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); // DexLabel('stop') | ||
return 0; | ||
} | ||
|
||
// DexExpectWatchValue('TestPi', 3.140000104904175, on_line='stop') | ||
// DexExpectWatchValue('S::TestCharA', 97, on_line='stop') | ||
// DexExpectWatchValue('ENUM_NEG', -2147000000, on_line='stop') | ||
/* DexExpectProgramState({'frames': [{ | ||
'location': {'lineno' : 'stop'}, | ||
'watches': {'ENUM_POS' : {'is_irretrievable': True}} | ||
}]}) */ |
Oops, something went wrong.