* gas/config/tc-avr.c: Change ISA for devices with USB support to
[external/binutils.git] / gdb / testsuite / gdb.base / freebpcmd.exp
index 26d5daf..fc2fe2d 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 2003, 2007, 2008, 2009 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
@@ -43,8 +43,6 @@
 # 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
@@ -60,12 +58,16 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
-gdb_test "break ${srcfile}:[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}
@@ -82,6 +84,7 @@ set lines {{if (i%2) == 0}
            {if i != 40}
            {c}
            {end}
+          {end}
            {end}}
 
 send_gdb "commands\n"
@@ -108,12 +111,16 @@ 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" {
         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"
     }
@@ -121,3 +128,5 @@ gdb_test_multiple "" "run program with breakpoint commands" {
         kfail "gdb/1489" "run program with breakpoint commands (GDB died)"
     }
 }
+
+set timeout $prev_timeout