* gas/config/tc-avr.c: Change ISA for devices with USB support to
[external/binutils.git] / gdb / testsuite / gdb.base / freebpcmd.exp
index f952139..fc2fe2d 100644 (file)
@@ -1,18 +1,17 @@
-#   Copyright 2003 Free Software Foundation, Inc.
+#   Copyright 2003-2013 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/>.
 
 
 # This is a regression test for the following bug, as of 2003-12-12:
 # reproduction recipe is more delicate than I would like.  I welcome
 # suggestions for improving this.
 
-set prms_id 0
-set bug_id 0
 
 set testfile "freebpcmd"
 set srcfile ${testfile}.c
-set srcfile1 ${testfile}1.c
 set binfile ${objdir}/${subdir}/${testfile}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+     untested freebpcmd.exp
+     return -1
 }
 
 gdb_exit
@@ -61,12 +58,16 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
-gdb_test "break [gdb_get_line_number "euphonium"]" "" "set breakpoint"
+gdb_test "break ${srcfile}:[gdb_get_line_number "euphonium"]" ".*" \
+    "set breakpoint"
 
 # The goal of all this is to make sure that there's plenty of memory
 # churn, and different amounts of it each time the inferior stops;
 # this seems to make GDB crash more reliably.
-set lines {{if (i%2) == 0}
+set lines {{if i<0 || i > 100}
+          {echo Invalid i value\n}
+          {else}
+          {if (i%2) == 0}
            {echo "even "}
            {print i}
            {else}
@@ -83,6 +84,7 @@ set lines {{if (i%2) == 0}
            {if i != 40}
            {c}
            {end}
+          {end}
            {end}}
 
 send_gdb "commands\n"
@@ -108,14 +110,23 @@ if {$i >= [llength $lines]} {
 }
 
 gdb_run_cmd
+
+set prev_timeout $timeout
+set timeout 120
+
 gdb_test_multiple "" "run program with breakpoint commands" {
     -re "warning: Invalid control type in command structure" {
-        fail "run program with breakpoint commands"
+        kfail "gdb/1489" "run program with breakpoint commands"
+    }
+    -re "Invalid i value\r\n$gdb_prompt $" {
+       xfail "run program with breakpoint commands (i value not readable)"
     }
     -re "$gdb_prompt $" {
         pass "run program with breakpoint commands"
     }
     eof {
-        fail "run program with breakpoint commands (GDB died)"
+        kfail "gdb/1489" "run program with breakpoint commands (GDB died)"
     }
 }
+
+set timeout $prev_timeout