]>
Commit | Line | Data |
---|---|---|
ecd75fc8 | 1 | # Copyright 2009-2014 Free Software Foundation, Inc. |
186c406b TT |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | ||
186c406b TT |
16 | load_lib "java.exp" |
17 | ||
c24ccbce TT |
18 | standard_testfile .java |
19 | if { [compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != "" } { | |
186c406b TT |
20 | untested "Couldn't compile ${srcdir}/$subdir/${srcfile}" |
21 | return -1 | |
22 | } | |
23 | ||
24 | # Start with a fresh gdb. | |
25 | ||
26 | clean_restart $testfile | |
27 | ||
28 | set line [gdb_get_line_number "break here" $testfile.java] | |
29 | if ![runto "$testfile.java:$line"] then { | |
30 | perror "couldn't run to jnpe.main" | |
31 | continue | |
32 | } | |
33 | ||
b4893d48 | 34 | if {![skip_unwinder_tests]} { |
186c406b TT |
35 | unsupported "jnpe.exp could not find _Unwind_DebugHook" |
36 | return -1 | |
37 | } | |
38 | ||
39 | gdb_test "handle SIGSEGV nostop noprint" \ | |
40 | "SIGSEGV.*fault" \ | |
41 | "disable SIGSEGV for next-over-NPE" | |
42 | ||
43 | # The line where we stop differs according to gcj; just check that we | |
44 | # did not already execute the catch point. This is done in a somewhat | |
45 | # funny way due to other gcj debuginfo oddities that don't | |
46 | # meaningfully affect the user's experience. | |
47 | ||
48 | gdb_test "next" \ | |
49 | ".*" \ | |
50 | "next over NPE" | |
51 | ||
52 | set line [gdb_get_line_number "stop point"] | |
53 | gdb_breakpoint $line | |
54 | gdb_test "continue" "Continuing.\[\r\n\]*success\[\r\n\]*Breakpoint .*:$line\[\r\n\]*.*// stop point\[\r\n\]*" \ | |
55 | "continue to success for next-over-NPE" |