-# 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
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}
{if i != 40}
{c}
{end}
+ {end}
{end}}
send_gdb "commands\n"
-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"
}