1 /* This test should test the source location attribution.
2 We print the line number of different parts of the program to make sure
3 that the source code attribution is correct.
4 To make this test pass, one need to have up-to-date addr2line installed
5 to parse the dwarf4 data format.
7 public class sourcelocation
{
8 public static void main(String args
[]) {
10 System
.out
.println(new Exception().getStackTrace()[0].getLineNumber());
11 throw new Exception();
12 } catch (Exception e
) {
13 System
.out
.println(new Exception().getStackTrace()[0].getLineNumber());
15 System
.out
.println(new Exception().getStackTrace()[0].getLineNumber());