2 This is a collection of tests to check debugging information generated by
3 compiler. This test suite can be checked out inside clang/test folder. This
4 will enable 'make test' for clang to pick up these tests.
6 Some tests (in the 'llgdb-tests' directory) are written with debugger
7 commands and checks for the intended debugger output in the source file,
8 using DEBUGGER: and CHECK: as prefixes respectively.
12 define i32 @f1(i32 %i) nounwind ssp {
20 is a testcase where the debugger is asked to break at function 'f1' and
21 print value of argument 'i'. The expected value of 'i' is 42 in this case.
23 Other tests are written for use with the 'Dexter' tool (in the 'dexter-tests'
24 and 'dexter' directories respectively). These use a domain specific language
25 in comments to describe the intended debugger experience in a more abstract
26 way than debugger commands. This allows for testing integration across
27 multiple debuggers from one input language.
31 void __attribute__((noinline, optnone)) bar(int *test) {}
35 bar(&test); // DexLabel('before_bar')
36 return test; // DexLabel('after_bar')
39 // DexExpectWatchValue('test', '23', on_line='before_bar')
40 // DexExpectWatchValue('test', '23', on_line='after_bar')
42 Labels two lines with the names 'before_bar' and 'after_bar', and records that
43 the 'test' variable is expected to have the value 23 on both of them.