1 # Copyright 2009-2016 Free Software Foundation, Inc.
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.
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.
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/>.
18 standard_testfile .java
19 if { [compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != "" } {
20 untested "Couldn't compile $subdir/${srcfile}"
24 # Start with a fresh gdb.
26 clean_restart $testfile
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"
34 if {![skip_unwinder_tests]} {
35 unsupported "jnpe.exp could not find _Unwind_DebugHook"
39 gdb_test "handle SIGSEGV nostop noprint" \
41 "disable SIGSEGV for next-over-NPE"
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.
52 set line [gdb_get_line_number "stop point"]
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"