Fix PR threads/19422 - show which thread caused stop
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.java / jnpe.exp
index 33113f182bfb3b5e8490fb4a5c8309c5a712503c..745cdf393b5a579a803e98ce16bc1aafb2bf64e8 100644 (file)
@@ -1,4 +1,4 @@
-# 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
 }
 
@@ -37,20 +31,7 @@ if ![runto "$testfile.java:$line"] then {
     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
 }
@@ -70,5 +51,5 @@ gdb_test "next" \
 
 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"
This page took 0.02594 seconds and 4 git commands to generate.