-# Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright 2009-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if $tracelevel then {
- strace $tracelevel
-}
-
load_lib "java.exp"
-set testfile "jnpe"
-set srcfile ${testfile}.java
-set binfile ${objdir}/${subdir}/${testfile}
-if { [compile_java_from_source ${srcdir}/$subdir/${srcfile} ${binfile} "-g"] != "" } {
- untested "Couldn't compile ${srcdir}/$subdir/${srcfile}"
+standard_testfile .java
+if { [compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != "" } {
+ untested "Couldn't compile $subdir/${srcfile}"
return -1
}
continue
}
-# See whether we have the needed unwinder hooks.
-set ok 1
-gdb_test_multiple "print _Unwind_DebugHook" "check for unwinder hook in java" {
- -re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" {
- pass "check for unwinder hook in java"
- }
- -re "No symbol .* in current context.?\r\n$gdb_prompt $" {
- # Pass the test so we don't get bogus fails in the results.
- setup_xfail *-*-*
- fail "check for unwinder hook in java"
- set ok 0
- }
-}
-if {!$ok} {
+if {![skip_unwinder_tests]} {
unsupported "jnpe.exp could not find _Unwind_DebugHook"
return -1
}
set line [gdb_get_line_number "stop point"]
gdb_breakpoint $line
-gdb_test "continue" "Continuing.\[\r\n\]*success\[\r\n\]*Breakpoint .*:$line\[\r\n\]*.*// stop point\[\r\n\]*" \
+gdb_test "continue" "Continuing.\[\r\n\]*success\[\r\n\]*Thread .* hit Breakpoint .*:$line\[\r\n\]*.*// stop point\[\r\n\]*" \
"continue to success for next-over-NPE"