* gas/config/tc-avr.c: Change ISA for devices with USB support to
[external/binutils.git] / gdb / testsuite / gdb.base / freebpcmd.exp
index cbc31be..fc2fe2d 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 2003, 2007, 2008, 2009, 2010 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
@@ -58,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}
@@ -80,6 +84,7 @@ set lines {{if (i%2) == 0}
            {if i != 40}
            {c}
            {end}
+          {end}
            {end}}
 
 send_gdb "commands\n"
@@ -113,6 +118,9 @@ 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"
     }