tree-eh.c (goto_queue_node): New field.

gcc:
	* tree-eh.c (goto_queue_node): New field.
	(record_in_goto_queue): New parameter.
	(record_in_goto_queue_label): New parameter.
	(lower_try_finally_dup_block): New parameter.
	(maybe_record_in_goto_queue): Update source location.
	(lower_try_finally_copy): Likewise.
	(honor_protect_cleanup_actions): Likewise.
	* gimplify.c (gimplify_expr): Reset the location to unknown.

testsuite:
	* g++.dg/debug/dwarf2/deallocator.C: New test.

libjava:
	* testsuite/libjava.lang/sourcelocation.java: New cases.
	* testsuite/libjava.lang/sourcelocation.out: New cases.

From-SVN: r191338
This commit is contained in:
Dehao Chen
2012-09-15 00:41:53 +00:00
committed by Dehao Chen
parent 71452ccd31
commit 820055a0ac
9 changed files with 109 additions and 12 deletions
@@ -0,0 +1,18 @@
/* This test should test the source location attribution.
We print the line number of different parts of the program to make sure
that the source code attribution is correct.
To make this test pass, one need to have up-to-date addr2line installed
to parse the dwarf4 data format.
*/
public class sourcelocation {
public static void main(String args[]) {
try {
System.out.println(new Exception().getStackTrace()[0].getLineNumber());
throw new Exception();
} catch (Exception e) {
System.out.println(new Exception().getStackTrace()[0].getLineNumber());
} finally {
System.out.println(new Exception().getStackTrace()[0].getLineNumber());
}
}
}