Index: gdb/testsuite/gdb.base/break.exp |
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp |
index 14e93451d2db6a7f69f0e07c66068cd23b365824..a15c39196368665ccc392be53a57547c539b04e4 100644 |
--- a/gdb/testsuite/gdb.base/break.exp |
+++ b/gdb/testsuite/gdb.base/break.exp |
@@ -1,5 +1,4 @@ |
-# Copyright 1988, 1990-1992, 1994-2000, 2002-2003, 2007-2012 Free |
-# Software Foundation, Inc. |
+# Copyright 1988-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 |
@@ -336,7 +335,7 @@ gdb_test "enable" "" "" |
gdb_test "disable 10" "No breakpoint number 10." \ |
"disable non-existent breakpoint 10" |
-gdb_test "set \$baz 1.234" |
+gdb_test_no_output "set \$baz = 1.234" |
gdb_test "disable \$baz" \ |
"Convenience variable must have integer value.*" \ |
"disable with non-integer convenience var" |
@@ -777,8 +776,8 @@ proc test_next_with_recursion {} { |
gdb_expect { |
-re "Break.* factorial .value=6. .*$gdb_prompt $" {} |
-re ".*$gdb_prompt $" { |
- fail "run to factorial(6)"; |
- gdb_suppress_tests; |
+ fail "run to factorial(6)" |
+ gdb_suppress_tests |
} |
timeout { fail "run to factorial(6) (timeout)" ; gdb_suppress_tests } |
} |
@@ -839,7 +838,7 @@ proc test_next_with_recursion {} { |
if [target_info exists gdb,noresults] { gdb_suppress_tests } |
gdb_continue_to_end "recursive next test" |
- gdb_stop_suppressing_tests; |
+ gdb_stop_suppressing_tests |
} |
test_next_with_recursion |
@@ -958,6 +957,18 @@ gdb_expect { |
} |
} |
+# |
+# Test break via convenience variable with file name |
+# |
+set line [gdb_get_line_number "set breakpoint 1 here"] |
+gdb_test_no_output "set \$l = $line" |
+gdb_breakpoint ${srcfile}:\$l |
+ |
+gdb_test_no_output "set \$foo=81.5" \ |
+ "set convenience variable \$foo to 81.5" |
+gdb_test "break $srcfile:\$foo" \ |
+ "Convenience variables used in line specs must have integer values.*" \ |
+ "set breakpoint via non-integer convenience variable disallowed" |
# Reset the default arguments for VxWorks |
if [istarget "*-*-vxworks*"] { |