| OLD | NEW |
| 1 # Copyright 2009-2012 Free Software Foundation, Inc. | 1 # Copyright 2009-2012 Free Software Foundation, Inc. |
| 2 | 2 |
| 3 # This program is free software; you can redistribute it and/or modify | 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 | 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 | 5 # the Free Software Foundation; either version 3 of the License, or |
| 6 # (at your option) any later version. | 6 # (at your option) any later version. |
| 7 # | 7 # |
| 8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
| 12 # | 12 # |
| 13 # You should have received a copy of the GNU General Public License | 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/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | 15 |
| 16 if $tracelevel then { | |
| 17 strace $tracelevel | |
| 18 } | |
| 19 | |
| 20 load_lib "java.exp" | 16 load_lib "java.exp" |
| 21 | 17 |
| 22 set testfile "jnpe" | 18 standard_testfile .java |
| 23 set srcfile ${testfile}.java | 19 if { [compile_java_from_source $srcdir/$subdir/$srcfile $binfile "-g"] != "" }
{ |
| 24 set binfile ${objdir}/${subdir}/${testfile} | |
| 25 if { [compile_java_from_source ${srcdir}/$subdir/${srcfile} ${binfile} "-g"] !=
"" } { | |
| 26 untested "Couldn't compile ${srcdir}/$subdir/${srcfile}" | 20 untested "Couldn't compile ${srcdir}/$subdir/${srcfile}" |
| 27 return -1 | 21 return -1 |
| 28 } | 22 } |
| 29 | 23 |
| 30 # Start with a fresh gdb. | 24 # Start with a fresh gdb. |
| 31 | 25 |
| 32 clean_restart $testfile | 26 clean_restart $testfile |
| 33 | 27 |
| 34 set line [gdb_get_line_number "break here" $testfile.java] | 28 set line [gdb_get_line_number "break here" $testfile.java] |
| 35 if ![runto "$testfile.java:$line"] then { | 29 if ![runto "$testfile.java:$line"] then { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 65 # meaningfully affect the user's experience. | 59 # meaningfully affect the user's experience. |
| 66 | 60 |
| 67 gdb_test "next" \ | 61 gdb_test "next" \ |
| 68 ".*" \ | 62 ".*" \ |
| 69 "next over NPE" | 63 "next over NPE" |
| 70 | 64 |
| 71 set line [gdb_get_line_number "stop point"] | 65 set line [gdb_get_line_number "stop point"] |
| 72 gdb_breakpoint $line | 66 gdb_breakpoint $line |
| 73 gdb_test "continue" "Continuing.\[\r\n\]*success\[\r\n\]*Breakpoint .*:$line\[\r
\n\]*.*// stop point\[\r\n\]*" \ | 67 gdb_test "continue" "Continuing.\[\r\n\]*success\[\r\n\]*Breakpoint .*:$line\[\r
\n\]*.*// stop point\[\r\n\]*" \ |
| 74 "continue to success for next-over-NPE" | 68 "continue to success for next-over-NPE" |
| OLD | NEW |