-# Copyright 2000, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 2000-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
# This file was based on jmisc.exp which in turn was written by
# Anthony Green. (green@redhat.com)
-if $tracelevel then {
- strace $tracelevel
-}
-
load_lib "java.exp"
-set testfile "jmain"
-set srcfile ${srcdir}/$subdir/${testfile}.java
-set binfile ${objdir}/${subdir}/${testfile}
-if { [compile_java_from_source ${srcfile} ${binfile} "-g"] != "" } {
- untested "Couldn't compile ${srcfile}"
- return -1
+if { [skip_java_tests] } { continue }
+
+standard_testfile .java
+if {[compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != ""} {
+ continue
}
-set prms_id 0
-set bug_id 0
# Start with a fresh gdb.
set earlybpmain "Breakpoint .* file .*jmain.java, line 4\."
gdb_load "${binfile}"
-setup_kfail *-*-* java/1567
+setup_kfail java/1567 *-*-*
gdb_test "break main" "${bpmain}"
# Check that an unqualified "main" works.
gdb_load "${binfile}"
-setup_kfail *-*-* java/1565
+setup_kfail java/1565 *-*-*
gdb_test "break jmain.main" "${bpmain}"
# Check that a fully qualified "main" works.
gdb_load "${binfile}"
-set cmd "break \'${testfile}.main(java.lang.String\[\])\'"
+set cmd "break ${testfile}.main(java.lang.String\[\])"
set msg $cmd
gdb_test_multiple $cmd $msg {
-re "${bpmain}\r\n$gdb_prompt $" {
gdb_test "n" "" ""
# Check again with a method signature at the end.
- set cmd "break \'${testfile}.main(java.lang.String\[\])void\'"
+ set cmd "break ${testfile}.main(java.lang.String\[\])void"
set msg $cmd
gdb_test_multiple $cmd $msg {
-re "${bpmain}\r\n$gdb_prompt $" {