+2012-06-05 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.base/freebpcmd.exp (set lines): Check valid range of I.
+ (run program with breakpoint commands): XFAIl if it is not.
+
2012-06-05 Joel Brobecker <brobecker@adacore.com>
* gdb.base/ctxobj-f.c (GET_VERSION): Introduce local variable
# 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"
}