# This testcase is part of GDB, the GNU debugger.
-# Copyright 1997, 1998, 1999, 2003, 2004 Free Software Foundation,
-# Inc.
+# Copyright 1997, 1998, 1999, 2003, 2004, 2007, 2008, 2009, 2010
+# 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
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
if $tracelevel then {
strace $tracelevel
#
# test running programs
#
-set prms_id 0
-set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ untested ena-dis-br.exp
+ return -1
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ untested ena-dis-br.exp
+ return -1
}
if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ untested ena-dis-br.exp
+ return -1
}
gdb_exit
set bp [break_at "marker1" " line ($bp_location15|$bp_location16)"]
-gdb_test "enable $bp" "" "enable break marker1"
+gdb_test_no_output "enable $bp" "enable break marker1"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y.*" \
}
}
-gdb_test "delete $bp" "" "delete break marker1"
+gdb_test_no_output "delete $bp" "delete break marker1"
# Verify that we can set a breakpoint to be self-disabling after the
# first time it triggers.
set bp [break_at "marker2" " line ($bp_location8|$bp_location9)"]
-gdb_test "enable once $bp" "" "enable once break marker2"
+gdb_test_no_output "enable once $bp" "enable once break marker2"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+dis\[ \t\]+y.*" \
set bp [break_at "marker3" " line ($bp_location17|$bp_location18)"]
-gdb_test "enable del $bp" "" "enable del break marker3"
+gdb_test_no_output "enable del $bp" "enable del break marker3"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*" \
set bp [break_at "marker4" " line ($bp_location14|$bp_location13).*"]
-gdb_test "disable $bp" "" "disable break marker4"
+gdb_test_no_output "disable $bp" "disable break marker4"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \
"Will ignore next crossing of breakpoint \[0-9\]*.*" \
"ignore break marker1"
-gdb_test "enable del $bp" "" "enable del break marker1"
+gdb_test_no_output "enable del $bp" "enable del break marker1"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*ignore next 1 hits.*" \
"Will ignore next 10 crossings of breakpoint \[0-9\]*.*" \
"ignore break marker1"
-gdb_test "disable $bp" "" "disable break marker1"
+gdb_test_no_output "disable $bp" "disable break marker1"
gdb_continue_to_end "no stop at ignored & disabled break marker1"
rerun_to_main