Adrian Prantl | f88c554 | 2013-09-06 18:10:42 | [diff] [blame] | 1 | -*- rst -*- |
Devang Patel | 59c97b5 | 2010-09-13 22:47:46 | [diff] [blame] | 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. Typically, test |
| 5 | cases included here includes debugger commands and intended debugger output |
| 6 | as comments in source file using DEBUGGER: and CHECK: as prefixes respectively. |
| 7 | |
Adrian Prantl | f88c554 | 2013-09-06 18:10:42 | [diff] [blame] | 8 | For example:: |
Devang Patel | 59c97b5 | 2010-09-13 22:47:46 | [diff] [blame] | 9 | |
Adrian Prantl | f88c554 | 2013-09-06 18:10:42 | [diff] [blame] | 10 | define i32 @f1(i32 %i) nounwind ssp { |
| 11 | ; DEBUGGER: break f1 |
| 12 | ; DEBUGGER: r |
| 13 | ; DEBUGGER: p i |
| 14 | ; CHECK: $1 = 42 |
| 15 | entry: |
| 16 | } |
Devang Patel | 59c97b5 | 2010-09-13 22:47:46 | [diff] [blame] | 17 | |
Adrian Prantl | f88c554 | 2013-09-06 18:10:42 | [diff] [blame] | 18 | is a testcase where the debugger is asked to break at function 'f1' and |
Devang Patel | 59c97b5 | 2010-09-13 22:47:46 | [diff] [blame] | 19 | print value of argument 'i'. The expected value of 'i' is 42 in this case. |